我正在尝试从pyCharm IDE的内部终端安装软件包“ preprocess”,但它显示了以下错误。
我尝试了此命令
pip install preprocess
我遇到以下错误
Collecting preprocess
Using cached
https://files.pythonhosted.org/packages/05/f9/559841df6c91428a2024ce120d92 192844178e4b2ceec1da84ce18205380/pr
eprocess-1.1.0.zip
ERROR: Command errored out with exit status 1:
command: 'c:\users\majid\appdata\local\programs\python\python38- 32\python.exe' -c 'import sys, setuptools, tokenize; sy
s.argv[0] = '"'"'C:\\Users\\majid\\AppData\\Local\\Temp\\pip- install-rsxg10hs\\preprocess\\setup.py'"'"'; __file__='"'"'C:\\
Users\\majid\\AppData\\Local\\Temp\\pip-install- rsxg10hs\\preprocess\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open
)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg
_info --egg-base 'C:\Users\majid\AppData\Local\Temp\pip-install- rsxg10hs\preprocess\pip-egg-info'
cwd: C:\Users\majid\AppData\Local\Temp\pip-install- rsxg10hs\preprocess\
Complete output (8 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\majid\AppData\Local\Temp\pip-install-rsxg10hs\preprocess\setup.py", line 28, in <module>
import preprocess
File "C:\Users\majid\AppData\Local\Temp\pip-install-rsxg10hs\preprocess\lib\preprocess.py", line 264
except Exception, ex:
^
SyntaxError: invalid syntax
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
答案 0 :(得分:0)
正如release history of the project preprocess
所示,这是一个非常老的项目,已经有10多年没有发布了。它不太可能与当前版本的Python兼容。问题中的错误输出似乎显示错误消息来自尝试为Python 3.8安装项目,错误本身似乎表明它在使用Python 2语法的代码上失败。
我完全不建议使用该项目。或者,您可以尝试将其与Python 2版本的解释器一起使用。