0

I have some issues to install package in Python.

Python version : 3.5.2

I used "pip install --upgrade pip" to reach the 9.0.3 version but I had proxy issues.

Then, I used the following command to set proxy variable :

set http_proxy=http://pseudo%20space:mdp%2Dtiret@proxy:port

set https_proxy=https://pseudo%20space:mdp%2Dtiret@proxy:port

Finally I use :

pip install --upgrade --proxy=https://pseudo%20space:mdp%2Dtiret@proxy:port pip

I get :

Could not fetch URL https://pypi.python.org/simple/pip: There was a problem confirming the ssl certificate: [SSL: CERTIFICATE_VERIFY_FAILED]....

(I have the admin rights)

Edit : - It is not a specific issue with pip, I can not install any package

Cœur
  • 32,421
  • 21
  • 173
  • 232
Moussa
  • 1
  • 2
  • Are you on VPN or something> Your connection seems to be blocked. You can try to go off VPN or if you have to be on VPN, there should be an artifact that can be reached to install packages for the environment you are in. – TYZ Apr 16 '18 at 13:18
  • Yes I'm on a kind of VPN but I get the authorization/activation to bypass/pass through the proxy so basically it should work I think – Moussa Apr 16 '18 at 13:23
  • Have you tried running this directly in your terminal: https://bootstrap.pypa.io/get-pip.py? – TYZ Apr 16 '18 at 13:25
  • I download the python script and I use "python get-pip.py" Then I get the same kind of error : "Could not fetch URL https://pypi.python.org/simple/pip: There was a problem confirming the ssl certificate: HTTPSConnectionPool: Max retries exceeded with url: /simple/pip/ – Moussa Apr 16 '18 at 13:42
  • How about this? https://stackoverflow.com/questions/25981703/pip-install-fails-with-connection-error-ssl-certificate-verify-failed-certi – TYZ Apr 16 '18 at 13:44
  • Possible duplicate of [Not able to install python packages \[SSL: TLSV1\_ALERT\_PROTOCOL\_VERSION\]](https://stackoverflow.com/questions/49768770/not-able-to-install-python-packages-ssl-tlsv1-alert-protocol-version) – Anupam Apr 16 '18 at 13:54
  • I test "pip install --upgrade --trusted-host pypi.python.org pip" - It downloaded pip-10.0.0-py2.py3-none-any.whl - It found existing packages pip 8.1.1 and uninstalled it then I get an exception, permission error and several exception When I try 'pip --version', I get "Fatal error in launcher: Unable to create process using..." – Moussa Apr 16 '18 at 14:01
  • Finally it seems that it worked pretty well with 'python -m pip install --upgrade --proxy=http://name:password@proxy:port --trusted-host pypi.python.org packageName' I installed the newest version of pip and also some tools like tensorflow, thanks Yilun Zhang! – Moussa Apr 16 '18 at 14:41
  • Please post your solution as an answer of its own, not as an edit. – Cœur Apr 22 '18 at 17:47
  • I moved your solution to a community wiki answer. – Cœur Apr 30 '18 at 10:50

2 Answers2

0

The upgrade command

pip install --upgrade pip 

does not work on Windows because the program attempts to delete itself while it is running. In Windows you need to do

python -m pip install --upgrade pip
BoarGules
  • 13,647
  • 2
  • 23
  • 38
0

Solution by OP.

Issues fixed with:

python -m pip install --upgrade --proxy=http://name:password@proxy:port --trusted-host pypi.python.org packageName
Cœur
  • 32,421
  • 21
  • 173
  • 232