擅长:python、mysql、java
<p>您需要安装<a href="https://python-pillow.org/" rel="noreferrer">Pillow</a>(以前是<a href="http://www.pythonware.com/products/pil/" rel="noreferrer">PIL</a>)。从<a href="http://docs.scipy.org/doc/scipy/reference/misc.html" rel="noreferrer">the docs</a>到<code>scipy.misc</code>:</p>
<blockquote>
<p>Note that Pillow is not a dependency of SciPy but the image manipulation functions indicated in the list below are not available without it:</p>
<p>... </p>
<p><code>imread</code></p>
<p>...</p>
</blockquote>
<p>安装枕头后,我可以按如下方式访问<code>imread</code>:</p>
<pre><code>In [1]: import scipy.misc
In [2]: scipy.misc.imread
Out[2]: <function scipy.misc.pilutil.imread>
</code></pre>