1

Please, why i have pip 1.5.4 in the (venv) ? how can i upgrade pip to 8.1.2 in the venv ? Thanks

 root@graphene-95:~# pip -V
 pip 8.1.2 from /usr/local/lib/python2.7/dist-packages/pip-8.1.2-py2.7.egg
 (python 2.7)
 root@graphene-95:~# pip3 -V
  The program 'pip3' is currently not installed. You can install it by     
 typing:
 apt-get install python3-pip
 root@graphene-95:~# source ~/tensorflow/venv/bin/activate
 (venv)root@graphene-95:~# pip -V
 pip 1.5.4 from /root/tensorflow/venv/local/lib/python2.7/site-packages
 (python 2.7)
 (venv)root@graphene-95:~# pip3 -v
 The program 'pip3' is currently not installed. You can install it by   
 typing:

 apt-get install python3-pip
5
  • pip install --upgrade pip will upgrade pip Commented Jul 29, 2018 at 13:03
  • 1
    Possible duplicate of How do I update pip itself from inside my virtual environment? Commented Jul 29, 2018 at 13:03
  • @ggdx in the (venv) ? Commented Jul 29, 2018 at 13:04
  • pip.pypa.io/en/stable/installing Commented Jul 29, 2018 at 13:05
  • @user1543915 - Yes. If you're in the venv, you should only do things in the venv so you don't screw up your host environment (i.e. the whole point of using a virtual env in the first place). Commented Jul 29, 2018 at 13:21

2 Answers 2

1

In order to install a specific version of pip , use the command pip install pip==8.2.1 after activating your virtual environment.

And , if you get SSL error like this

Could not fetch URL https://pypi.python.org/simple/pip/: There was a problem confirming the ssl certificate: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590) - skipping.

Then , first you to have get the latest pip , then only you can install a particular version of pip.So, to get latest pip, execute this command

curl https://bootstrap.pypa.io/get-pip.py | python.

Now try this pip install pip==8.2.1

Sign up to request clarification or add additional context in comments.

2 Comments

this error is due to the proxy settings of your system.pip is trying to download the package via proxy and it fails to do so.
0

i solved with the following command, and it worked for me: sudo su root sudo su root apt-get purge -y python-pip wget https://bootstrap.pypa.io/get-pip.py python ./get-pip.py apt-get install python-pip

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.