【问题标题】:package 'preprocess' installing error using pip command使用 pip 命令包“预处理”安装错误
【发布时间】:2020-03-24 18:56:23
【问题描述】:

我正在尝试从 pyCharm IDE 的内部终端安装包“预处理”,但它显示以下错误。

我试过这个命令

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.

【问题讨论】:

    标签: python pip package


    【解决方案1】:

    正如release history of the project preprocess 所示,这是一个非常古老的项目,10 多年来没有发布过。它不太可能与当前版本的 Python 兼容。问题中的错误输出似乎表明错误消息来自尝试为 Python 3.8 安装项目,而错误本身似乎表明它在使用 Python 2 语法的代码上失败。

    我根本不推荐使用这个项目。或者,您可以尝试将它与 Python 2 版本的解释器一起使用。

    【讨论】:

      猜你喜欢
      • 2017-02-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-11-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多