简体   繁体   中英

Packages getting installed only in Python 2.7 but not in 3.5

i'm using pip to install the packages I need: Numpy & Scipy. However, they only work if I import them using python 2.7 . When I try doing in with 3.5 it seems as if it wasn't 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 --version and 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 I download, I can use them with Python 3.5. I don't use 2.7 but I don't want to delete it because I read it's not such a good idea.

Can anyone explain me how can I install the packages for them to work on 3.5 and not only in 2.7, please?

Thank you very much in advance for reading :) and useful help.

PS: Im using OS X 10.9.5

Packages for Python 2 and Python 3 are installed separately, and installing in one version won't make a package available to the other. pip is Python 2, and so it only installs for Python 2; to install packages for Python 3, use pip3 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM