Installing a package in Python

I have both python 2.7 and python 3.5 installed on my laptop. When I install the package and use for example:

pip install thunder-python 

or

 easy_install thunder 

command line packages are installed for python 3.5. How to install packages for their use in python 2.7? I am using Windows 10.

+1
source share
2 answers

Add C:\Python27\Scripts to your PATH in the system settings, and you can run:

pip3 thunder to install packages for Python 3.x

and

pip2 thunder or pip2.7 thunder to install packages for Python 2.7.

Without changing the PATH for Python 2.7, you can run the command directly:

C:\Python27\Scripts\pip thunder .

After changing the PATH command, pip is called from the first folder, so if you add the Python2.7 directory to the end, you will get pip to run for Python3 if you add Python2. 7 before starting, you will get pip to run for Python2.7.

0
source

How about using pyenv ? If you use it, you can change and switch the version and install the package as follows.

 $ pyenv local 2.7.X $ pip install thunder-python 

after that

 $ pyenv local 3.5.X $ pip install thunder-python 
0
source

Source: https://habr.com/ru/post/1241298/


All Articles