satinder singh
satinder singh

Reputation: 429

pip install, installing packages for other python version

I am working on a GPU instance on AWS. There are some already provided Conda environments. I am using tensorflow2_latest_p37 environment. This environment has 2 python 3 versions .i.e python 3.6 and python 3.7.

All the preinstalled packages are available in python 3.7

But whenever I am trying to do pip install dlib it would install it for python 3.6. How can I install this for python 3.7?

Upvotes: 0

Views: 720

Answers (2)

Saggi Bashari
Saggi Bashari

Reputation: 436

Run the command: which python. Probably it will show you python3.6, it means that your default python version is 3.6.

You need to search your pip3 path.

path/to/pip3 install dlib.

Upvotes: 2

Serge Ballesta
Serge Ballesta

Reputation: 148900

If you know how to use the Python 3.7 environment, you can simply use python -m pip install ... or more exactly:

command_for_python3.7 -m pip install package_name

If unsure, you should search for commands starting with python in /bin, /usr/bin and /usr/local/bin. You could also have Python installations under /opt.


On Windows, the magic word is py:

py 3.7 -m pip install package_name

Upvotes: 2

Related Questions