请阅读安装过程中的Docs:Distutils2错误

2024-06-11 21:56:46 发布

您现在位置:Python中文网/ 问答频道 /正文

我尝试在Win10上安装Read-the-Docs的本地实例

当我遵循此文档时:
http://docs.readthedocs.io/en/latest/install.html

和类型:

pip install -r requirements.txt

我得到这个错误:

Collecting Distutils2==1.0a3 (from -r requirements/pip.txt (line 65))
  Using cached Distutils2-1.0a3.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\USER\AppData\Local\Temp\pip-build-xseiavup\Distutils2\setup.py", line 9, in <module>
        from distutils2.util import find_packages
      File "C:\Users\USER\AppData\Local\Temp\pip-build-xseiavup\Distutils2\distutils2\util.py", line 174
        except KeyError, var:
                       ^
    SyntaxError: invalid syntax

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\USER\AppData\Local\Temp\pip-build-xseiavup\Distutils2\

有人知道这个错误吗?你知道吗

我的pip版本:8.1.2;
python:3.5版


Tags: pipinfrompybuildlocalsetupline
1条回答
网友
1楼 · 发布于 2024-06-11 21:56:46

有没有可能您正在运行python2pip?错误消息清楚地表明代码是在python3下执行的,但是有python2语法。你有更好的结果吗

python -m pip install -r requirements.txt

我想知道?如果没有,则验证

python

运行版本3.5。。。你知道吗

哦。我刚查过,上面写着

Distutils2开发已停止。

太长了,读不下去了,不要用DISTTILS2。你知道吗

看起来好像从来没有Python3版本。看起来您可能需要更新代码。你知道吗

相关问题 更多 >