2013-02-27 93 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