Search code examples
python-2.7scikit-imagenumpy-ufunc

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


I have installed skimage using 'pip install scikit-image' inside a conda environment. I am using python 2.7.

When I try importing :

from skimage import transform

It gives me the error:

AttributeError: 'numpy.ufunc' object has no attribute 'module'

Can someone please help me out?


Solution

  • Seems like you have mismatched version of scikit-image and numpy because of the recent updates in each of it's respective library. The correct version that I found works compatible with each other is 0.14.1 for scikit-image and 1.15.4 for numpy.

    Install these specific version of libraries by executing these commands:

    pip uninstall scikit-image
    pip uninstall numpy
    pip install scikit-image==0.14.1
    pip install numpy==1.15.4
    

    Now importing these libraries should work and produce no error.