简体   繁体   中英

How to import Scipy and Numpy in Python?

I am very new to Python and want to add Numpy and Scipy module. I think my question is very simple for you. I am using Python 3.06a.1 version. I think I already installed something called Anaconda that contains those library. When I type import scipy I get the following message:

import scipy
Traceback (most recent call last):
  File "<pyshell#6>", line 1, in <module>
    import scipy
ImportError: No module named 'scipy'

also when I want to installed with command line I get the following message which means that I have it already.

   localhost:~ user$ pip install scipy
Requirement already satisfied (use --upgrade to upgrade): scipy in ./anaconda/lib/python3.5/site-packages
localhost:~ user$ 

Please help me to fix this problem

You shouldn't have problem with scipy and numpy if you installed Anaconda. What I'm advising you may sound stupid, but I'm sure it has a good chance to solve your problem.

Relaunch Anaconda, reboot your computer, reinstall Anaconda.

Edit : also watch out to use "scipy" and not "spicy" as I just witnessed in your logs.

如果您使用的是anaconda,请尝试使用anaconda安装scipy:

conda install scipy

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