解决 AttributeError: 'numpy.ufunc' object has no attribute '__module__'

Disclaimer: This article is a blogger original article, without the bloggers allowed to reprint, please set the link to the article! https://blog.csdn.net/qq_30460905/article/details/88956627

After much searching, finally found to be caused by different versions of numpy, reference links: https://github.com/scikit-image/scikit-image/issues/3654

Numpy1.15 version is possible, feasible pro-test to see numpy version

>>> import numpy
>>> print numpy.__version__
1.15.4

installation steps:

//先卸载numpy,多卸载几次
pip uninstall numpy
//安装限定numpy版本
sudo pip install numpy==1.15.4

Starting with the emergence of RuntimeError: module compiled against API version 0xc but this version of numpy is 0xa error, said before the search has conflicting versions, updates numpy have said, and meal operation, basically following these orders, finally appeared the above error. . . . . . Finally, install Numpy 1.15 version will be solved.

sudo pip install numpy --upgrade

sudo easy_install numpy

pip uninstall numpy

Guess you like

Origin blog.csdn.net/qq_30460905/article/details/88956627