Importing image to python :cannot import name imread
Importing image to python :cannot import name imread
You also need to install PIL (Pillow) as that is what scipy
uses to read images:
pip install Pillow
note from the docs:
imread uses the Python Imaging Library (PIL) to read an image. The following notes are from the PIL documentation.
however, you might want to think about switching to scipy.imageio.imread
since scipy.misc.imread
is deprecated :
imread is deprecated! imread is deprecated in SciPy 1.0.0, and will be removed in 1.2.0. Use imageio.imread instead
Use:
from imageio import imread
it worked for me.
Importing image to python :cannot import name imread
Apparently a lot of people had this issue and the solution was to install Pillow
. Perhaps try to install Pillow and run it again
sudo pip install Pillow==2.6.0
Source of information: https://github.com/Newmu/stylize/issues/1
Related posts:
- python – Skimage.filter not importing into conda virtual environment on mac
- uml – SPARX Enterprise Architect – importing transparent image exports with black background
- Extendscript with Photoshop: Importing an image
- java – Importing Images Into Eclipse
- javascript – Enzyme render fails when importing image with webpack while testing with Jest
- Importing images into visio using VBA
- typescript – Importing image in gatsby config fail
- html – importing image on canvas html5
- Importing Image into Android Studio, image appears as dark grey
- enterprise architect – Importing the image to image manager from add-in