gpt4 book ai didi

python - 导入错误 : The _imaging C module is not installed? PIL Python3

转载 作者:行者123 更新时间:2023-11-28 19:24:42 27 4
gpt4 key购买 nike

root@syscomp1:~# cd Pillow-master
root@syscomp1:~/Pillow-master# python3 selftest.py
Traceback (most recent call last):
File "selftest.py", line 8, in <module>
from PIL import Image
File "./PIL/Image.py", line 155, in <module>
if hasattr(core, 'DEFAULT_STRATEGY'):
File "./PIL/Image.py", line 39, in __getattr__
raise ImportError("The _imaging C module is not installed")
ImportError: The _imaging C module is not installed
root@syscomp1:~/Pillow-master#

这是我安装PIL之前的步骤

sudo apt-get install python-pip python-dev build-essential 
sudo pip install --upgrade pip
sudo pip install --upgrade virtualenv
sudo aptitude install python3-setuptools
sudo easy_install3 pip
sudo apt-get install python3-dev
download the Pillow-master.zip
wget https://github.com/python-imaging/Pillow/archive/master.zip
go to downloaded directory and,
sudo unzip master.zip
sudo apt-get install libjpeg62-dev //must install this
sudo apt-get install zlib1g-dev
sudo apt-get install libfreetype6-dev
sudo apt-get install liblcms1-dev
python3 setup.py build_ext -i

但是 The _imaging C module is not installed 错误,为什么?

最佳答案

看起来像 setup.py 中的 Python 2 打印语句:

  Downloading from URL http://effbot.org/media/downloads/PIL-1.1.7.tar.gz (from http://effbot.org/downloads/)
Running setup.py egg_info for package pil

Traceback (most recent call last):

File "<string>", line 16, in <module>

File "<pyenv>/build/pil/setup.py", line 182

print "--- using Tcl/Tk libraries at", TCL_ROOT

关于python - 导入错误 : The _imaging C module is not installed? PIL Python3,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16057130/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com