1

I'm having problems with importing scipy.misc in my python script. Now I know other people also posted questions concerning this, but their solutions are not working for me.

The program I am writing begins like this:

import matplotlib as plt
from matplotlib.pyplot import imshow
from PIL import Image
from scipy.misc import bytescale
from skimage import exposure
import numpy as np

And I get an error from the scipy.misc line: ImportError: cannot import name doccer

I gathered I had to update scipy and maybe numpy, which let me to these posts:

Can't install Scipy through pip and ImportError when importing certain modules from SciPY

After this, I updated pip succesfully (this installer I generally use) and tried to update scipy. However, this gave me a lot of errors.

In the end, I tried to manually update scipy using this post and website, as suggested by others: filename.whl is not supported wheel on this platform and http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy

However, somehow I get a lot of red text and 'Exception' messages (unfortunately I cannot copy/paste it here), and it ends with an IOError: [Errno22] invalid mode ('rb') or filename. I tried to install a different version of numpy as well, with similar results.

I'm unsure how to continue from here. I'm not an expert on programming or computers, so I would appreciate some help.

I'm using Windows 7, 64-bit operating system, python2.7.10 32bits, spyder 2.3.5.2

Community
  • 1
  • 1
J.Doe
  • 11
  • 2
  • See also: http://stackoverflow.com/q/30539950/554319 http://stackoverflow.com/q/24596594/554319 – astrojuanlu Jun 29 '16 at 11:38
  • Uninstall both previous numpy and scipy. Download the correct files. You have to install `pip install numpy-1.11.1+mkl-cp27-cp27m-win32.whl` and then scipy with the `pip install scipy-0.17.1-cp27-cp27m-win32.whl` with cmd window run as administrator. – percusse Jun 30 '16 at 15:13

1 Answers1

1

Since you aren't an expert on programming or computers I would recommend that you switch to a Python distribution that brings an up-to-date SciPy and many other libraries with it. Continuum's open source Anaconda package will remove all the maintenance hassles for you.

holdenweb
  • 33,305
  • 7
  • 57
  • 77