Answer the question
In order to leave comments, you need to log in
How to choose Python version when installing a package via pip?
Previously, I used pip to install the package for version 2, and pip3 for version 3, but now through pip all packages are installed on python 3. How to install package on 2 via pip?
macOS
Answer the question
In order to leave comments, you need to log in
You read it wrong, it asks for the -H flag not when calling pip, but when calling sudo
Try
sudo pip install <package for 2nd python>
sudo pip3 install <package for 3rd python>
pip2 install <имя пакета>
pip --version # чтобы проверить, для какой версии пакет будет установлен по умолчанию
In general, you need to learn pip through the python to which you need a lib. Try pip2 or see whereis pip and alias pip to the second python.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question