ImportError:没有名为pkg_resources的模块

时间:2014-03-11 02:08:31

标签: python

如何纠正此错误:

Traceback (most recent call last):
  File "c:\Apps\pypi\bin\buildout-script.py", line 15, in <module>
    import site # imports custom buildout-generated site.py
  File "c:\Apps\pypi\parts\buildout\site.py", line 673, in <module>
    main()
  File "c:\Apps\pypi\parts\buildout\site.py", line 656, in main
    known_paths = addsitepackages(known_paths)
  File "c:\Apps\pypi\parts\buildout\site.py", line 316, in addsitepackages
    import pkg_resources
ImportError: No module named pkg_resources

ImportError:没有名为pkg_resources的模块

当我在Windows上尝试配置/设置mypypi https://pypi.python.org/pypi/mypypi/1.3.0时,我得到了这个,任何人?感谢的

1 个答案:

答案 0 :(得分:2)

pkg_resources位于setuptools包中。你需要先安装它。建议的方法是从https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py下载并运行ez_setup.py