Not sure what is causing this...
I am running Python 3.4.3 using the "Pillow-3.3.0.win32-py34.exe" installation file.
Upon import Image with
from PIL import Image
I try to set "a.jpg" as my image using
img = Image.open("a.jpg")
However I get this error,
>>> 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'
Might not be related to Pillow, but would still really appreciate help!
Is there a file called numbers.py
in the current working directory?
That could be the reason of the problem, because it'd prevent the import of the standard library module numbers.
(Suggestion from here.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With