首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在安装过程中阅读Docs: Distutils2错误

在安装过程中阅读Docs: Distutils2错误
EN

Stack Overflow用户
提问于 2016-09-28 12:28:09
回答 1查看 126关注 0票数 1

我尝试在我的Win10上安装读取文档的本地实例

当我跟踪这些文档时:

http://docs.readthedocs.io/en/latest/install.html

和类型:

代码语言:javascript
复制
pip install -r requirements.txt

我知道这个错误:

代码语言:javascript
复制
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

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-09-28 12:44:33

您是否有可能正在运行Python2 pip?错误消息清楚地表明代码是在Python 3下执行的,但具有Python 2语法。你能得到更好的结果吗

代码语言:javascript
复制
python -m pip install -r requirements.txt

我想知道?如果没有,那就核实一下

代码语言:javascript
复制
python

运行3.5版..。

噢。我刚查了一下,disutils2页面在PyPI上

Distutils2开发已停止.

tl;dr:现在继续使用setuptools和pip,不要使用distutils2。

看起来从来没有Python 3版本。看起来你可能需要更新你的代码。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/39747527

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档