Packages installed only in Python 2.7, but not in 3.5

I use pip to install the packages I need: Numpy and Scipy. However, they only work if I import them using python 2.7 . When I try to do with 3.5, it seems like it is not installed at all.

I updated pip and got its version pip 8.0.2 from /Library/Python/2.7/site-packages (python 2.7), then I tried: pip3.5 --versionand got:

pip 8.0.2 from /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-
packages (python 3.5)

All I want is that all packages are downloaded, I can use them with Python 3.5. I do not use 2.7, but I do not want to delete it, because I read this is not a good idea.

Can someone explain to me how I can install packages for their work on 3.5, and not just in version 2.7, please?

Thanks in advance for reading :) and helpful help.

PS: Im using OS X 10.9.5

+4
source share
1 answer

Packages for Python 2 and Python 3 are installed separately, and installing in one version will not make the package available to another. pip- This is Python 2, so it is installed only for Python 2; to install packages for Python 3 use pip3.

+12
source

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


All Articles