Python 导入错误:没有名为“setuptools”的模块
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/16510787/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
ImportError: No module named 'setuptools'
提问by user2375506
I'm new to python and have just installed the Python 3, I'm new to Python and I'm facing difficulties in importing a new library.
我是 Python 新手,刚刚安装了 Python 3,我是 Python 新手,在导入新库时遇到困难。
I'm trying to import tweepy-master library into python, I read the instructions given on their github page and did the "python setup.py install"command in command prompt (on windows 8), but I get the error which I've mentioned above,
我正在尝试将 tweepy-master 库导入 python,我阅读了他们 github 页面上给出的说明并"python setup.py install"在命令提示符下执行了命令(在 Windows 8 上),但我收到了上面提到的错误,
Guys, please help, is there a separate library called setuptools which I need to install first?
伙计们,请帮忙,我需要先安装一个名为 setuptools 的单独库吗?
回答by Robert Lujo
It seems that you should use Setuptools, i.e. Distributeis deprecated:
似乎您应该使用Setuptools,即不推荐使用Distribute:
Distribute is a deprecated fork of the Setuptools project. Since the Setuptools 0.7 release, Setuptools and Distribute have merged and Distribute is no longer being maintained. All ongoing effort should reference the Setuptools project and the Setuptools documentation.
Distribute 是 Setuptools 项目的弃用分支。自 Setuptools 0.7 版本以来,Setuptools 和 Distribute 已合并,不再维护 Distribute。所有正在进行的工作都应参考 Setuptools 项目和 Setuptools 文档。
Obsolete
过时的
You should use distribute- a setuptools fork which "offers Python 3 support".
你应该使用distribute——一个“提供Python 3支持”的setuptools fork。
Installation instructions (according to documentation):
安装说明(根据文档):
- download python-distribute.org/distribute_setup.py (link is broken, obsolete information)
- run it:
python distribute_setup.py
- 下载 python-distribute.org/distribute_setup.py(链接已失效,信息已过时)
- 运行:
python distribute_setup.py
It is recommended to install piptoo: easy_install pip
建议也安装pip:easy_install pip

