+ 1

How to make sure which python version my pip packages are installed for

I use macOS and therefore there is a default python 2.7 and a 3.6 which was installed by myself. I am a beginner and I am rather confused that I don’t know whether my pip packs are installed for the 2.7 or the 3.6 Many thanks!

5th Nov 2018, 9:07 PM
马嵩 (Ma, Song)
马嵩 (Ma, Song) - avatar
1 Respuesta
+ 4
You can install your pip packages for specific python versions. From the docs: On Linux, Mac OS X, and other POSIX systems, use the versioned Python commands in combination with the -m switch to run the appropriate copy of pip: # default Python 2 python2 -m pip install SomePackage # specifically Python 2.7 python2.7 -m pip install SomePackage # default Python 3 python3 -m pip install SomePackage # specifically Python 3.4 python3.4 -m pip install SomePackage https://docs.python.org/3/installing/index.html
6th Nov 2018, 1:56 AM
Kishalaya Saha
Kishalaya Saha - avatar