不确定是什么导致这个......
我使用“Pillow-3.3.0.win32-py34.exe”安装文件运行Python 3.4.3。
导入图像
from PIL import Image
我尝试使用
将“a.jpg”设置为我的图像img = Image.open("a.jpg")
但是我收到了这个错误,
>>> img = Image.open("a.jpg")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python34\lib\site-packages\PIL\Image.py", line 2289, in open
preinit()
File "C:\Python34\lib\site-packages\PIL\Image.py", line 365, in preinit
from PIL import JpegImagePlugin
File "C:\Python34\lib\site-packages\PIL\JpegImagePlugin.py", line 40, in <modu
le>
from PIL import Image, ImageFile, TiffImagePlugin, _binary
File "C:\Python34\lib\site-packages\PIL\TiffImagePlugin.py", line 50, in <modu
le>
from fractions import Fraction
File "C:\Python34\lib\fractions.py", line 6, in <module>
from decimal import Decimal
File "C:\Python34\lib\decimal.py", line 3855, in <module>
_numbers.Number.register(Decimal)
AttributeError: 'module' object has no attribute 'Number'
可能与Pillow无关,但仍然非常感谢帮助!