MXnet: RuntimeError: module compiled against API version a but this version of numpy is 9



在MXnet中,使用python命令"import mxnet as mx",出现如下错误:

RuntimeError: module compiled against API version a but this version of numpy is 9


这是因为numpy的版本太低,于是要更新numpy,使用命令"sudo pip install -U numpy"更新,更新失败,

于是打算卸载numpy重装"sudo pip uninstall numpy",却出现了错误"Not uninstalling numpy at /usr/lib/python2.7/dist-packages, owned by OS",

之后用"sudo apt-get remove python-numpy",才卸载掉了,

再用"sudo pip install numpy",提供提示numpy已存在,是1.8.0版本,

最后再次使用"sudo pip install -U numpy",才更新成功了,

用" pip search "numpy" "查看numpy版本,为"1.10.4(latest)",总算是更新成功了。

可以成功使用"import mxnet as mx"了。

MXnet: RuntimeError: module compiled against API version a but this version of numpy is 9_第1张图片



你可能感兴趣的:(MXnet)