2013-02-27 128 views
3

我已经在Python 2.7中安装了easy_installsetuptools。我在使用easy_install pip安装pip时发生了恶梦。我遵循我的SO帖子和博客,但仍然没有帮助。在Windows 7中设置pip 64位

以下是我收到我的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' 
+0

首先检查你是否能做到这一步'C:\用户\ XYZ> PIP安装 您必须提供至少一个要求安装(请参阅“pip帮助安装”) – kvivek 2013-02-27 09:44:36

回答

1

我认为在你尝试,你莫名其妙地搞砸了你的Python安装。虽然我确信你可以使用python.org中的CPython安装程序(我和其他许多人都这样做),但我强烈建议重新开始(干净地删除目前为止的内容)并安装一个Python分发版具有一些更多的功能,例如:

他们附带了几个额外的软件包,包括点。他们的安装程序也会正确设置您的Windows PATH。因此,在运行安装程序后,你可以继续前进,开始cmd.exe和运行pythonpip install ...

EPD的免费版本,可以发现here。我自己对EPD和Python(x,y)都有很好的经验。 Here是标准Python(x,y)安装程序带来的“插件”列表。请注意,对于Windows,EPD和Python(x,y)仅可用于32位版本......但是,Windows 64位ActivePython是免费的(PyPM软件包对于64位不是免费的)。根据您的需要,这可能不是问题。

1

我去了https://pypi.python.org/pypi/pip 有一个焦油,你可以从那里下载。下载后只需在Python \ Scripts文件夹中的命令提示符下运行“easy_install pip-1.3.1.tar.gz”即可。 似乎做的工作。 希望这可以帮助

2

我做到了这一点我正在使用Windows 7 x64。

     Installing Python 2.7 

https://www.python.org/download/releases/2.7.2 -------- 86的Windows MSI安装程序(2.7.2)(SIG)

Python 2.7版安装后(我默认安装在C:\ python27)等等你准备好了。

      **Installing PIP:** 

下载文件get-pip.py

https://raw.github.com/pypa/pip/master/contrib/get-pip.py

保存它,在一个已知的文件夹:C:\ PIP \

转到Windows - 运行 - 输入cmd。 exe

在cmd中。EXE类型:

CD C:\ python27(或你安装Python的路线)

您将看到:

C:\ python27

现在类型(记住路线,你保存get-pip.py我们的案例c:\ pip)。

C:\ python27 \ python.exe C:\ PIP \ get-pip.py

皮普将被安装。

     Using Pip to Install Django 
与Python和PIP

现在安装转到Windows - 运行 - 键入cmd.exe

内的cmd.exe类型:

CD C:\ python27

你会看到这:

C:\ python27

现在键入

python.exe -m PIP安装XXXXXXX

皮普会安装XXXXXX所需的软件包。

例子: PIP安装Django == 1.6.2

注:本指南适用于TOTALLY新手AT Python和WINDOWS。

问候

[email protected] www.adtein.com