我已经在Python 2.7中安装了easy_install和setuptools.使用easy_install pip安装pip时遇到噩梦.我一直关注我的SO帖子和博客,但仍然没有帮助.以下是我在Windows cmd中收到的错误:Searching for pipReading http://...

我已经在Python 2.7中安装了easy_install和setuptools.使用easy_install pip安装pip时遇到噩梦.我一直关注我的SO帖子和博客,但仍然没有帮助.
以下是我在Windows cmd中收到的错误:
Searching for pip
Reading http://pypi.python.org/simple/pip/
Download error: [Errno 10061] No connection could be made because the target mac
hine actively refused it -- Some packages may not be found!
Couldn't find index page for 'pip' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading http://pypi.python.org/simple/
Download error: [Errno 10061] No connection could be made because the target mac
hine actively refused it -- Some packages may not be found!
No local packages or download links found for pip
Best match: None
Traceback (most recent call last):
File "C:\Python27\Scripts\easy_install-script.py", line 8, in <module>
load_entry_point('setuptools==0.6c11', 'console_scripts', 'easy_install')()
File "C:\Python27\lib\site-packages\setuptools\command\easy_install.py", line
1712, in main
with_ei_usage(lambda:
File "C:\Python27\lib\site-packages\setuptools\command\easy_install.py", line
1700, in with_ei_usage
return f()
File "C:\Python27\lib\site-packages\setuptools\command\easy_install.py", line
1716, in <lambda>
distclass=DistributionWithoutHelpCommands, **kw
File "C:\Python27\lib\distutils\core.py", line 152, in setup
dist.run_commands()
File "C:\Python27\lib\distutils\dist.py", line 953, in run_commands
self.run_command(cmd)
File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "C:\Python27\lib\site-packages\setuptools\command\easy_install.py", line
211, in run
self.easy_install(spec, not self.no_deps)
File "C:\Python27\lib\site-packages\setuptools\command\easy_install.py", line
434, in easy_install
self.local_index
File "C:\Python27\lib\site-packages\setuptools\package_index.py", line 475, in
fetch_distribution
return dist.clone(location=self.download(dist.location, tmpdir))
AttributeError: 'NoneType' object has no attribute 'clone'
解决方法:
我认为您在尝试过程中以某种方式弄乱了Python设置.虽然我确定您可以从python.org中使用CPython安装程序进行操作(我和其他许多人都这样做了),但我还是强烈建议从头开始(干净地删除到目前为止的内容)并安装其中一个Python发行版.具有更多功能,例如:
> ActivePython
> Enthought Python Distribution(EPD)或
> Python(x,y).
它们附带安装了几个其他软件包,包括pip.他们的安装程序还会正确设置Windows PATH.因此,在运行安装程序之后,您可以继续,启动cmd.exe并运行python或pip install …
EPD的免费版本可以找到here.我本人在EPD和Python(x,y)方面都有很好的经验. Here是标准Python(x,y)安装程序带来的“插件”列表.请注意,对于Windows,EPD和Python(x,y)都仅提供32位版本…但是,适用于Windows的ActivePython 64位是免费的(PyPM软件包并非64位免费).根据您的需求,这可能不是问题.
本文标题为:python-在Windows 7 64位中设置pip


基础教程推荐
- python嵌套try...except如何使用详解 2022-08-30
- CentOS 7 安装ovirt-engine-sdk-python 3.6.7.0 2023-09-03
- 基于OpenCV实现小型的图像数据库检索功能 2023-08-04
- Python3.8.0安装(windows) 2023-11-11
- python-Windows Azure API:以编程方式创建VM 2023-11-12
- Python之进程 2023-09-04
- python验证多组数据之间有无显著差异 2023-08-08
- pandas中df.rename()的具体使用 2022-08-30
- python匹配linux通配符 2023-09-03
- 如何使用Python和ctypes在Windows上读写a s h r文件属性? 2023-11-13