Oct-25-2019, 09:53 AM
pip will always install packages if not already installed, the question is where will it install?
there is one pip script for each version of python.
which version of pip is active is dependent of which version python is active.
To complicate a bit more, there is pip and pip3
pip3 will always work with python 3
from command line, python -V will give active python version
pip -V will give pip version along with the python version it's paired with.
example on my system:
if you install pyenv, and use virtual environment they will always be properly paired.
there is one pip script for each version of python.
which version of pip is active is dependent of which version python is active.
To complicate a bit more, there is pip and pip3
pip3 will always work with python 3
from command line, python -V will give active python version
pip -V will give pip version along with the python version it's paired with.
example on my system:
(venv) Flask$ python -V Python 3.8.0 (venv) Flask$ pip -V pip 19.2.3 from ... python3.8/site-packages/pip (python 3.8)you can see that pip and python versions are matched (python 3.8)
if you install pyenv, and use virtual environment they will always be properly paired.