我想導入PIL在Sikuli做這件事我已經添加下面無法導入PIL在Sikuli
import sys
sys.path.append("C:\\Python27\Lib\site-packages")
sys.path.append("C:\\Python27\Lib\site-packages\PIL")
import PIL
import Image
所以進口上述模塊,但是當我試圖導入ImageFont,它給的代碼我錯誤如下:
def getmask2(self, text, mode="", fill=Image.core.fill):
File "C:\Python27\Lib\site-packages\PIL\Image.py", line 39, in __getattr__
raise ImportError("The _imaging C module is not installed")
ImportError: The _imaging C module is not installed
我能夠在Python腳本中成功導入PIL和Image和ImageFont並且代碼運行良好。 任何想法如何解決這個問題?
似乎沒有安裝PIL的C庫部分。你是如何安裝PIL的? –
我用PIL-fork-1.1.7.win-amd64-py2.7二進制來從這個站點安裝PIL:http://www.lfd.uci.edu/~gohlke/pythonlibs/ – VarunVyas