Can't import numpy after Anaconda installed
我刚刚安装了Anaconda 3.5。 终端显示正确的版本,甚至括号内的Continuum Analytics:
1 2 3 | Python 3.5.0 |Continuum Analytics, Inc.| (default, Oct 20 2015, 14:39:26) [GCC 4.2.1 (Apple Inc. build 5577)] on darwin Type"help","copyright","credits" or"license" for more information. |
但是,当我键入以下内容时:
1 | >>> import numpy |
我收到错误:
1 2 3 | Traceback (most recent call last): File"<stdin>", line 1, in <module> ImportError: No module named 'numpy' |
我知道Anaconda带有numpy(我跑
我的
1 2 3 4 5 6 7 8 9 10 11 12 | # Setting PATH for Python 2.7 # The orginal version is saved in .bash_profile.pysave PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}" export PATH # added by Anaconda3 2.3.0 installer export PATH="/Users/username/anaconda/bin:$PATH" # Setting PATH for Python 3.5 # The orginal version is saved in .bash_profile.pysave PATH="/Library/Frameworks/Python.framework/Versions/3.5/bin:${PATH}" export PATH |
我最终卸载了Anaconda和所有版本的Python 3.重新安装Anaconda后,
1 2 3 | Python 3.5.0 |Anaconda 2.4.0 (x86_64)| (default, Oct 20 2015, 14:39:26) [GCC 4.2.1 (Apple Inc. build 5577)] on darwin Type"help","copyright","credits" or"license" for more information. |
显然,看到"Continuum Analytics"并不意味着你正在使用Anaconda。