![](/img/trans.png)
[英]Reversing the translation of the Pillow Image Library Rotation
[英]Error in Importing Image by Pillow library
我的代碼在這里導入py 2.7中的圖像
from PIL import Image
fimg=Image.open('C:/Users/Haseeb/esktop/Images/billa_jpg_000.jpg')
但我收到了這個錯誤。
Traceback (most recent call last):
File "c:\Python27\Python for Begginers\newcode.py", line 1, in <module>
from PIL import Image
File "C:\Python27\lib\site-packages\PIL\Image.py", line 115, in <module>
import numbers
File "c:\Python27\Python for Begginers\numbers.py", line 1, in <module>
from PIL import image
ImportError: cannot import name image
Pillow 正在嘗試導入“數字”模塊。
https://github.com/python-pillow/Pillow/blob/master/PIL/Image.py#L116
https://docs.python.org/2/library/numbers.html
但是您有一個名為 numbers.py 的文件,它正試圖打開它。 如果你重命名它,它應該可以工作。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.