Is there any way to make pip
play well with multiple versions of Python? For example, I want to use pip
to explicitly install things to either my s
On Windows, you can execute the pip module using a given Python version through the Python launcher, py.exe
, if you chose to install it during Python 3 setup.
py -3 -m pip install packagename
py -2 -m pip install packagename
You can be even more specific and request an exact sub-version of Python:
py -3.6 -m pip install packagename
To get a list of all installed Python versions available through the launcher, run:
py --list
Alternatively, you can launch the desired Python executable directly:
C:/path/to/specific/python.exe -m pip install packagename