loading...

Rabu, 17 Januari 2018

Menjalankan pip dibelakang proxy

PIP merupakan sistem paket manajemen, yang digunakan untuk menginstall paket di python.

Kebetulan di kantor menggunakan proxy, dimana sewaktu saya menjalankan perintah untuk menginstal paket pymysql, terdapat error sbb:
C:\Users\shrid1hdjkt01>pip install pymysql
Collecting pymysql
  Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x0632A5B0>, 'Connection to pypi.python.org timed out. (connect timeout=15)')': /simple/pymysql/

  Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x0632A2B0>, 'Connection to pypi.python.org timed out. (connect timeout=15)')': /simple/pymysql/
  Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x0632A3B0>, 'Connection to pypi.python.org timed out. (connect timeout=15)')': /simple/pymysql/
  Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x0632A1B0>, 'Connection to pypi.python.org timed out. (connect timeout=15)')': /simple/pymysql/
  Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x0632A250>, 'Connection to pypi.python.org timed out. (connect timeout=15)')': /simple/pymysql/
  Could not find a version that satisfies the requirement pymysql (from versions: )
No matching distribution found for pymysql

Solusi:
Gunakan perintah berikut:
C:\Users\>pip install --proxy http://user:password@ip_proxy:port <nama-paket>


Tidak ada komentar:

Posting Komentar