2017-08-30 22 views
0

我想在Windows 8上安裝PIP庫。當前的Python版本 - 2.7.3。我從https://pip.pypa.io/en/stable/installing/Python-無法在Windows上安裝點 - 沒有匹配的點分佈發現PIP

下載get-pip.py當我執行以下命令時出現命令提示符(以管理員身份) Python get-pip.py,出現以下錯誤。我在我的公司網絡上運行。這個命令是否期望我提供IP地址?我試圖尋找解決方案,但無法得到滿意的答案。有解決辦法嗎?如果沒有,還有什麼替代方案嗎?請建議

C:\windows\system32>cd C:\Python27 

C:\Python27>python get-pip.py 
Collecting pip 
    Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connec 
tion broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.conne 
ction.VerifiedHTTPSConnection object at 0x03654450>: Failed to establish a new c 
onnection: [Errno 10061] No connection could be made because the target machine 
actively refused it',)': /simple/pip/ 
    Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connec 
tion broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.conne 
ction.VerifiedHTTPSConnection object at 0x03654490>: Failed to establish a new c 
onnection: [Errno 10061] No connection could be made because the target machine 
actively refused it',)': /simple/pip/ 
    Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connec 
tion broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.conne 
ction.VerifiedHTTPSConnection object at 0x03654410>: Failed to establish a new c 
onnection: [Errno 10061] No connection could be made because the target machine 
actively refused it',)': /simple/pip/ 
    Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connec 
tion broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.conne 
ction.VerifiedHTTPSConnection object at 0x03654150>: Failed to establish a new c 
onnection: [Errno 10061] No connection could be made because the target machine 
actively refused it',)': /simple/pip/ 
    Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connec 
tion broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.conne 
ction.VerifiedHTTPSConnection object at 0x03654550>: Failed to establish a new c 
onnection: [Errno 10061] No connection could be made because the target machine 
actively refused it',)': /simple/pip/ 
    Could not find a version that satisfies the requirement pip (from versions:) 
No matching distribution found for pip 

C:\Python27> 

回答

0

Windows有msi installers collection一些Python包的所有Python版本,32位和64位。您需要

  1. 安裝setuptools
  2. 安裝PIP

之後,我發現PIP在C:\ Python27 \腳本\ pip.exe。現在你可以將它添加到你的路徑

0

你是否與互聯網連接?
首先連接到互聯網並再次輸入此命令。如果那麼這個問題也沒有解決。安裝時下載python可以選擇安裝pip。檢查該選項並將pip安裝到您的系統中。

將有選項添加點到您的path variable選擇也。

,如果你面對安裝pip請參閱本link

0

我能成功地從企業斷開後安裝PIP使用互聯網連接。它試圖以某種方式拒絕連接請求。一旦我連接到當地的咖啡店熱點,它完美運作。謝謝你的支持。 Pip安裝在python 2.7.3上

Microsoft Windows [Version 6.3.9600] 
(c) 2013 Microsoft Corporation. All rights reserved. 

C:\windows\system32>cd C:\Python27 

C:\Python27>python get-pip.py 
Collecting pip 
c:\users\aja67\appdata\local\temp\tmpvssw7v\pip.zip\pip\_vendor\requests\package 
s\urllib3\util\ssl_.py:318: SNIMissingWarning: An HTTPS request has been made, b 
ut the SNI (Subject Name Indication) extension to TLS is not available on this p 
latform. This may cause the server to present an incorrect TLS certificate, whic 
h can cause validation failures. You can upgrade to a newer version of Python to 
solve this. For more information, see https://urllib3.readthedocs.io/en/latest/ 
security.html#snimissingwarning. 
c:\users\aja67\appdata\local\temp\tmpvssw7v\pip.zip\pip\_vendor\requests\package 
s\urllib3\util\ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is 
not available. This prevents urllib3 from configuring SSL appropriately and may 
cause certain SSL connections to fail. You can upgrade to a newer version of Py 
thon to solve this. For more information, see https://urllib3.readthedocs.io/en/ 
latest/security.html#insecureplatformwarning. 
    Downloading pip-9.0.1-py2.py3-none-any.whl (1.3MB) 
    100% |################################| 1.3MB 328kB/s 
Collecting wheel 
    Downloading wheel-0.29.0-py2.py3-none-any.whl (66kB) 
    100% |################################| 71kB 597kB/s 
Installing collected packages: pip, wheel 
Successfully installed pip-9.0.1 wheel-0.29.0 
c:\users\aja67\appdata\local\temp\tmpvssw7v\pip.zip\pip\_vendor\requests\package 
s\urllib3\util\ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is 
not available. This prevents urllib3 from configuring SSL appropriately and may 
cause certain SSL connections to fail. You can upgrade to a newer version of Py 
thon to solve this. For more information, see https://urllib3.readthedocs.io/en/ 
latest/security.html#insecureplatformwarning. 

C:\Python27>