I use Python 3.8.5 with an Anaconda virtual environment. I need to use pip in order to install some python packages in my environment. But for any package installation, I get an error relating a SSL error and a wrong version number :
Ubuntu prompt
Note that my company uses a proxy but variables http_proxy
, https_proxy
, HTTP_PROXY
and HTTPS_PROXY
are all set properly and I have already tried to use the pip option --proxy
. I have searched a lot for solutions on different forums but none of its help me to solve my problem. Even if you can't solve it, I would be very grateful if I can have some explanations on this bug. For example :
Also note that that my OS is Ubuntu 20.04.
Thanks in advance for your help.
EDIT :
Steffen Ulrich found the problem : the https_variable
was set to https://proxy
instead of http://proxy
. Thanks a lot Steffen !
pip can be configured to connect through a proxy server in various ways: using the --proxy command-line option to specify a proxy in the form scheme://[user:passwd@]proxy.server:port. using proxy in a Configuration Files. by setting the standard environment-variables http_proxy , https_proxy and no_proxy .
Updating Pip When an update for pip is available, and you run a pip command, you will see a message that says, “You are using pip version xy. a, however version xy. b is available.” You can run “pip install --upgrade pip” to install and use the new version of pip.
The https_variable should be set to http://proxy
instead of https://proxy
So, before anything else, just run this command:
For Windows:
set https_proxy=http://login:password@address:port
For Ubuntu:
export https_proxy=http://login:password@address:port
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With