ImportError:在readthedocs.org的构建中没有名为“pkg_resources”的模块

时间:2016-10-02 01:34:45

标签: python read-the-docs

我开始使用readthedocs为我的一个项目构建文档,它的工作时间很长,但现在我遇到了这个疯狂的错误:

Collecting sphinx==1.3.5
  Using cached Sphinx-1.3.5-py2.py3-none-any.whl
Collecting Pygments==2.1.3
  Using cached Pygments-2.1.3-py2.py3-none-any.whl
Collecting setuptools==20.1.1
  Using cached setuptools-20.1.1-py2.py3-none-any.whl
Collecting docutils==0.12
  Using cached docutils-0.12-py3-none-any.whl
Collecting mkdocs==0.15.0
  Using cached mkdocs-0.15.0-py2.py3-none-any.whl
Collecting mock==1.0.1
Collecting pillow==2.6.1
Collecting readthedocs-sphinx-ext from git+https://github.com/rtfd/readthedocs-sphinx-ext.git@0.6-alpha#egg=readthedocs-sphinx-ext
  Cloning https://github.com/rtfd/readthedocs-sphinx-ext.git (to 0.6-alpha) to /tmp/pip-build-dpx17gw2/readthedocs-sphinx-ext
Could not import setuptools which is required to install from a source distribution.
Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/pyee/envs/latest/local/lib/python3.4/site-packages/pip/req/req_install.py", line 372, in setup_py
    import setuptools  # noqa
  File "/home/docs/checkouts/readthedocs.org/user_builds/pyee/envs/latest/local/lib/python3.4/site-packages/setuptools/__init__.py", line 11, in <module>
    from setuptools.extern.six.moves import filterfalse, map
  File "/home/docs/checkouts/readthedocs.org/user_builds/pyee/envs/latest/local/lib/python3.4/site-packages/setuptools/extern/__init__.py", line 1, in <module>
    from pkg_resources.extern import VendorImporter
ImportError: No module named 'pkg_resources'

我是否需要以某种方式安装setuptools?这甚至可能吗?我的模块之前使用的是setuptools,很好;改变了什么?

编辑:这是在公共服务上,而不是在我的本地主机上。

1 个答案:

答案 0 :(得分:0)

是的,你可以安装setuptools python软件包,或者你可以下载软件包解压缩它,只需将它放在python安装目录的site-packages中或pythonpath的位置