2017-07-07 2 views
1

Python pip funktioniert nicht hinter ProxyPIP nicht funktioniert - Proxy

I

versucht
sudo -H pip --proxy https://proxy_ip:proxy_port install <package> 

sudo -H pip --proxy https://usename:[email protected]_ip:proxy_port install <package> 

sudo easy_install pip 

und nichts funktioniert, habe ich versucht, auch Umgebungsvariablen HTTP_PROXY aber es funktioniert nicht.

Zum Beispiel, hier ist der Fehler, wenn Toolz zu installieren versuchen:

Collecting toolz 
    Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', error('Tunnel connection failed: 407 Proxy Authentication Required',))': /simple/toolz/ 
    Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', error('Tunnel connection failed: 407 Proxy Authentication Required',))': /simple/toolz/ 
    Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', error('Tunnel connection failed: 407 Proxy Authentication Required',))': /simple/toolz/ 
    Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', error('Tunnel connection failed: 407 Proxy Authentication Required',))': /simple/toolz/ 
    Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', error('Tunnel connection failed: 407 Proxy Authentication Required',))': /simple/toolz/ 
    Could not find a version that satisfies the requirement toolz (from versions:) 
No matching distribution found for toolz 
+0

werden können, die Sie this post verweisen. –

Antwort

2

ich pip hinter einem Proxy häufig installieren verwenden. Hier ist die Syntax, die für mich funktioniert:

1

Das Problem lag innerhalb einer Conf-Datei, die alte Proxy-Einstellungen lädt. Auch bei den Umgebungsvariablen wird zwischen Groß- und Kleinschreibung unterschieden. So prüfen Sie, ob es einen Unterschied zwischen HTTP_PROXY und http_proxy von printenv unter Linux mit

Dann als @MedAli vorgeschlagen: das Hinzufügen --proxy während pip mit arbeiten

Verwandte Themen