0

What i think i know currently is this:

  1. The way to install pip is sudo apt-get install python-pip
  2. sudo apt-get install python-pip installs pip at '/usr/lib/python3/dist-packages'
  3. pip install abc installs abc to virtualenv where pip that gets called is

I use conda, and i have an environment 'env' created with it for some time now. I needed to install a package that said i needed pip3 > 19.0.1 so i which pip and it was 9.0.2 and it was well within the environment. i updated the pip using python -m pip install --upgrade pip and it got upgraded to 20.0.2. I am happy. However, which pip3 gives me global location, version 9.0.2 and the package i am going to be installing requires pip3 install .. command and conda install pip3 doesn't exist

questions:

  1. How do i install pip3 in a conda environment?
  2. Supposing i did not have conda install pip or let us say i had a non conda virtualenv created, how do i go about installing a pip in this environment so that pip install ... does not install to global location?
figs_and_nuts
  • 4,870
  • 2
  • 31
  • 56
  • was the virtual environment `env` created with python 2 or with python 3? – S.Au.Ra.B.H Jan 28 '20 at 22:30
  • Look this -> https://stackoverflow.com/questions/41060382/using-pip-to-install-packages-to-anaconda-environment – Kalana Jan 29 '20 at 04:58
  • Conda doesn't use the aliases `pip3` or `pip2`, instead just activate the environment and use `pip`. Also, please read the documentation ["Using Pip in a Conda Environment"](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#pip-in-env) to familiarize oneself with the problems it can cause. I strongly recommend against using Pip in the **base** environment. – merv Jan 29 '20 at 17:19

0 Answers0