Original error was: cannot import name multiarray 解决办法

错误代码

ImportError: 
Importing the multiarray numpy extension module failed.  Most
likely you are trying to import a failed build of numpy.
If you're working with a numpy git repo, try `git clean -xdf` (removes all
files not under version control).  Otherwise reinstall numpy.

Original error was: cannot import name multiarray

原因是python没使用anaconda等环境,多个python版本导致包混乱,解决办法是在~/.zshrc添加python对应的版本的路径

# 我是使用python2.7的numpy,所以在添加python2.7的路径
export PYTHONPATH="/usr/local/lib/python3.5/dist-packages:$PYTHONPATH"

你可能感兴趣的:(python)