How to install scipy misc package

I installed (actually reinstalled) scipy:

10_x86_64.whl (19.8MB): 19.8MB downloaded
Installing collected packages: scipy
Successfully installed scipy

But the different subpackage is apparently not included?

16:03:28/shared $ipython
In [1]: from scipy.misc import imread
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-f9d3d927b58f> in <module>()
----> 1 from scipy.misc import imread

ImportError: cannot import name imread

What is the way to install scipy.misc package?

+4
source share
2 answers

I think you also need to install PIL. From the scipy.misc docs:

Note that the Python Image Library (PIL) is not dependent on SciPy, and therefore the pilutil module is not available on systems for which PIL is not installed.

+10
source

, Python 2.7.12 Windows XP/SP3. , Python MacBook, , Windows. . winbox pip ver. 8, pip ver. 9, Python, , . numpy Pillow ( PIL), "pip install numpy" "pip install Pillow", "pip install scipy" "pip install scipy.misc" " ". numpy, : 1) numpy + mkl, 2) scipy, - Windows, .whl(wheel), : http://www.lfd.uci.edu/~gohlke/pythonlibs/ , . , Windows, C:\some \. . numpy + mkl, pip, scipy . Gohlke, pip . winbox :

C:\some\directory\> pip install numpy-1.12.1rc1+mkl-cp27-cp27m-win32.whl

( )

Installing collected packages: numpy
Successfully installed numpy-1.12.1rc1+mkl

( )

C:\some\directory\> pip install scipy-0.18.1-cp27-cp27m-win32.whl

" ...". . , Python :

>>> import numpy as np
>>> from PIL import Image, ImageDraw
>>> import scipy.misc

. .jpg :

image = Image.open("Somefile.jpg")
image.show()

somefile.jpg.

0

All Articles