2016-11-21 13 views
2

私はSOがこの問題を手助けできると考えています。私がvirtualenvにいるときにパッケージをpipできない

私はvirtualenvにいるときにパッケージをpipできません。私はWindows 7、Python 2.7.12です。例えば

、私はこのようにgitのbashを使用する場合:

(venv2) 
[email protected] ~/git/myrepo (master) 
$ pip install requests 

私は次のエラーを取得する:

Collecting requests 
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x02A438F0>: Failed to establish a new connection: [Errno 11003] getaddrinfo failed',)': /simple/requests/ 
Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x02A43790>: Failed to establish a new connection: [Errno 11003] getaddrinfo failed',)': /simple/requests/ 
Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x02A43B50>: Failed to establish a new connection: [Errno 11003] getaddrinfo failed',)': /simple/requests/ 
Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x02A43DD0>: Failed to establish a new connection: [Errno 11003] getaddrinfo failed',)': /simple/requests/ 
Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x02A43E50>: Failed to establish a new connection: [Errno 11003] getaddrinfo failed',)': /simple/requests/ 
Could not find a version that satisfies the requirement requests (from versions:) 
No matching distribution found for requests 

私はvirtualenvのではないですしかし、私はパッケージをインストールピップすることができますちょうど良い。私は似たようなエラーに関する多くのSOの質問を読んだことがありますが、私のケースにはうまく一致しません。

私が試したいくつかの事柄:pythonのアンインストールと再インストール。アップグレードピップ; Pythonのバージョンを切り替える。あなたは正しい方向に私を指すことができる場合

、私は非常にそれが

答えて

2

旧質問いただければと思いますが、私はちょうど非常によく似た問題を抱えていたし、掲示何の答えはありませんでした。

私のレポが私のG:ドライブにあって、pythonのインストールがC:上にあった。 RepoをC:ドライブに移動すると問題が解決し、pipを使用してvenv requirements.txtをインストールすることができました。 G上の

:Cの

(env) G:\repo\>pip install -r requirements.txt 
Collecting flask>=0.11 (from -r requirements.txt (line 1)) 
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 0x0000000004393E10>: Failed to establish 
a new connection: [Errno 11003] getaddrinfo failed',)': /simple/flask/ 
    Retrying (Retry(total=3, ... 

    Could not find a version that satisfies the requirement flask>=0.11 (from -r r 
equirements.txt (line 1)) (from versions:) 
No matching distribution found for flask>=0.11 (from -r requirements.txt (line 1 
)) 

\:

(env) C:\repo\>pip install -r requirements.txt 
Collecting flask>=0.11 (from -r requirements.txt (line 1)) 
    Using cached Flask-0.12-py2.py3-none-any.whl 
... 
+0

\これは、それを解決!ありがとう。 – ocertat

関連する問題