擅长:python、mysql、java
<p>原始的<code>pil</code>包与python3不兼容,
所以应该使用<code>pillow</code>一个pil分支</p>
<p><strong>警告PIL和枕头目前不能在同一环境中共存。如果您想使用枕头,请先去掉枕头。</strong></p>
<p>首先卸载并删除旧的PIL目录(如果存在)</p>
<pre><code>sudo pip uninstall pil
sudo rm -rf /usr/local/lib/python3.2/dist-packages/PIL
</code></pre>
<p>安装依赖项</p>
^{pr2}$
<p>现在安装枕头</p>
<pre><code>pip install Pillow
</code></pre>
<p>确保你已经在你的<code>/usr/local/lib/python[VERSION]/dist-packages/</code>中安装了枕头
如果安装成功,您应该看到2个目录,如
<strong>枕头-2.4.0-py3.2.鸡蛋信息</strong>
和<strong>PIL</strong></p>
<p><a href="http://pillow.readthedocs.org/en/latest/installation.html" rel="nofollow">see here</a>获取更多详细信息和其他平台</p>