cs231n / cs231n.github.io

Public facing notes page
MIT License
10.13k stars 4.06k forks source link

assignment1 jupyter notebook knn import error with `import imread` #169

Open abitofalchemy opened 7 years ago

abitofalchemy commented 7 years ago

This is a very basic issue:

      6 import matplotlib.pyplot as plt
      7 

/Volumes/theory/Experiments/tensorflow/assignment1/cs231n/data_utils.py in <module>()
      4 import numpy as np
      5 import os
----> 6 from scipy.misc import imread

I've tried all sort of possible solutions online, but the main problem is that this module is not round. imread. I've tried to restart from scratch on macOS system w/out getting past this. Does anyone have any suggestions?

abitofalchemy commented 7 years ago

Looks like if I try: from scipy.ndimage import imread that error goes away.

BrunoGomesCoelho commented 5 years ago

It seems it is a version difference with Pillow and Scipy (at least it was in my case). Writing about it here in case anyone comes across this:

From stackoverflow:

If you have Pillow installed with scipy and it is still giving you error then check your scipy version because it has been removed from scipy since 1.3.0rc1. rather install scipy==1.1.0. It worked for me!

Using pip install scipy==1.1.0 and pip install Pillow==4.3.0 (maybe pip3 for you) fixed it for me.