windows 安装错误easy_install python
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/8020673/
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
Install error easy_install python
提问by ths1104
I use Windows 7 and Python IDLE.
我使用 Windows 7 和 Python IDLE。
I'm trying to use easy_install but gut this error:
我正在尝试使用 easy_install,但遇到了这个错误:
Traceback (most recent call last): File "", line 1, in easy_install NameError: name 'easy_install' is not defined
回溯(最近一次调用最后一次):文件“”,第 1 行,在easy_install NameError 中:未定义名称“easy_install”
In included in my 'Path' the directory where it has been installed (C:\Python27\Scripts). Any thoughts on what could be wrong?
在我的“路径”中包含它的安装目录 (C:\Python27\Scripts)。关于可能出什么问题的任何想法?
Maybe... In Python IDLE > File > Path browser, I cannot see C:\Python27\Scripts. How to add it ?
也许...在 Python IDLE > 文件 > 路径浏览器中,我看不到 C:\Python27\Scripts。如何添加?
回答by koxt
Make sure you've done all of this.
确保你已经完成了所有这些。
- Adding Python to Windows Path.
- Downloading and installing setuptoolsfor appropriate python version.
- Adding Scripts directory (for instance C:\Python27\Scripts) to Windows Path.
You can check installing by opening a command prompt and typing "
easy_install
"
- 将 Python 添加到 Windows 路径。
- 下载并安装适合 Python 版本的setuptools。
- 将 Scripts 目录(例如 C:\Python27\Scripts)添加到 Windows 路径。您可以通过打开命令提示符并键入“
easy_install
”来检查安装
回答by Petr Viktorin
easy_install
is an executable program, not a Python script. Run it from the Windows command line, not from Python.
easy_install
是一个可执行程序,而不是 Python 脚本。从 Windows 命令行运行它,而不是从 Python。
回答by Eenvincible
I once had a similar problem when I was trying to use easy_install. I finally was able to install both easy_install and pip although I really needed just one of them to get the job done.
我曾经在尝试使用 easy_install 时遇到过类似的问题。我终于能够同时安装 easy_install 和 pip,尽管我真的只需要其中之一来完成工作。
If you are still struggling with this problem, I would suggest you follow these instructions I put together recently for others who asked me to. It is fairly easy to follow in order to re-install easy_install on your machine. I also explain how to add the directory to your path - which sounds like you have done already but still seeing the above problem. Here is the link that might help you solve this problem.
如果您仍然在为这个问题而苦苦挣扎,我建议您按照我最近为其他要求我做的人整理的这些说明进行操作。为了在您的机器上重新安装easy_install,遵循它是相当容易的。我还解释了如何将目录添加到您的路径 - 听起来您已经完成了但仍然看到上述问题。这是可以帮助您解决此问题的链接。
Simple easy_install installation guide for windows
适用于 Windows 的简单 easy_install 安装指南
I hope this helps you get back up and running again! Good luck!
我希望这可以帮助您重新启动并运行!祝你好运!