2013-09-21 15 views
9

Kiedy użyć polecenia:Jak korzystać z easy_install za pośrednictwem serwera proxy http w systemie Windows?

easy_install spotter

zainstalować pakiet spotter, mam następujący komunikat o błędzie

Searching for spotter 
Reading http://pypi.python.org/simple/spotter/ 
Download error on http://pypi.python.org/simple/spotter/: [Errno 11001] getaddrinfo  failed -- Some packages may not be found! 
Reading http://pypi.python.org/simple/spotter/ 
Download error on http://pypi.python.org/simple/spotter/: [Errno 11001] getaddrinfo failed -- Some packages may not be found! 
Couldn't find index page for 'spotter' (maybe misspelled?) 
Scanning index of all packages (this may take a while) 
Reading http://pypi.python.org/simple/ 
Download error on http://pypi.python.org/simple/: [Errno 11001] getaddrinfo failed -- Some packages may not be found! 
No local packages or download links found for spotter 
error: Could not find suitable distribution for Requirement.parse('spotter') 

dwóch zmiennych środowiskowych: http_proxy i https_proxy nie wydają się do pracy?

Installing Python's easy_install using ez_setup.py from behind a proxy server

+0

Setting 'http_proxy' działa dla mnie. Co dokładnie robisz? –

Odpowiedz

8

Czy spróbować następujących czynności:

$ export http_proxy=http://username:[email protected]:portnumber 
$ export https_proxy=https://username:[email protected]:portnumber 

A potem

$ sudo -E easy_install spotter 

miałem problem podobny do Ciebie (Jestem za bardzo restrykcyjny firewall + kombinacji proxy) i powyższy zestaw poleceń i kombinacji działał dla mnie (w środowisku GNU/Linux, szczególnie Ubuntu).

+1

To zadziałało dla mnie. Brakowało mi '-E' na' sudo'. – jtpereyda

2

Z wiersza polecenia systemu Windows, należy najpierw ustawić zmienne dwa środowiska:

c:\> set http_proxy=<user>:<password>@<proxy_ip_address>:<port> 
c:\> set https_proxy=<user>:<password>@<proxy_ip_address>:<port> 

Potem udało mi się uruchomić (w tym samym terminalu):

easy_install spotter 
Powiązane problemy