2013-09-21 12 views
9

quando uso il comando:Come usare easy_install dietro un proxy http su Windows?

easy_install spotter

Per installare il pacchetto spotter, ho ottenuto il seguente messaggio di errore

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') 

Le due variabili d'ambiente: http_proxy e https_proxy non sembrano funzionare?

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

+0

Impostazione 'http_proxy' funziona per me. Cosa stai facendo esattamente? –

risposta

8

Hai provato la seguente:

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

E poi

$ sudo -E easy_install spotter 

ho avuto un problema simile al tuo (io sono dietro un firewall + combinazione di delega molto restrittiva) e l'insieme di comandi e combinazioni di cui sopra ha funzionato per me (in un ambiente GNU/Linux, in particolare Ubuntu).

+1

Questo ha funzionato per me. Mi mancava il '-E' su' sudo'. – jtpereyda

2

Dal prompt dei comandi di Windows, prima impostare le variabili di due ambiente:

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

Poi, sono stato in grado di correre (nello stesso terminale):

easy_install spotter