加载模块Pillow时出错

2 投票
1 回答
1759 浏览
提问于 2025-04-17 23:17

我通过Anaconda安装了Pillow这个库,但我无法加载这个模块(见下文)。我该怎么解决这个问题呢?

dhcp-86-216:Python_code Alberto$ pip install Pillow
Requirement already satisfied (use --upgrade to upgrade): Pillow in /Users/Alberto/anaconda/lib/python2.7/site-packages
Cleaning up...
dhcp-86-216:Python_code Alberto$ python 
Python 2.7.6 (v2.7.6:3a1db0d2747e, Nov 10 2013, 00:42:54) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import Pillow
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named Pillow

1 个回答

3

导入的是 PIL,而不是 Pillow

import PIL

撰写回答