gpt4 book ai didi

python - PIL - libjpeg.so.8 : cannot open shared object file: No such file or directory

转载 作者:IT老高 更新时间:2023-10-28 21:11:25 25 4
gpt4 key购买 nike

编译了 libjpeg v8、PIL 1.1.7 和 import for _imaging 在系统 Python 上工作,但在 virtualenv 中出现此错误:

libjpeg.so.8: cannot open shared object file: No such file or directory

这是在 virtualenv 中使用 python -v 解释器运行的错误

>>> import _imaging
dlopen("/home/ygamretuta/dev/py/django/lib/python2.6/site-packages/PIL/_imaging.so", 2);
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: libjpeg.so.8: cannot open shared object file: No such file or directory

这里是路径:

/home/ygamretuta/dev/py/django/lib/python2.6/site-packages/distribute-0.6.14-py2.6.egg
/home/ygamretuta/dev/py/django/lib/python2.6/site-packages/pip-0.8.1-py2.6.egg
/home/ygamretuta/dev/py/django/lib/python2.6
/home/ygamretuta/dev/py/django/lib/python2.6/plat-linux2
/home/ygamretuta/dev/py/django/lib/python2.6/lib-tk
/home/ygamretuta/dev/py/django/lib/python2.6/lib-old
/home/ygamretuta/dev/py/django/lib/python2.6/lib-dynload
/usr/lib/python2.6
/usr/lib/python2.6/plat-linux2
/usr/lib/python2.6/lib-tk
/home/ygamretuta/dev/py/django/lib/python2.6/site-packages
/home/ygamretuta/dev/py/django/lib/python2.6/site-packages/PIL

我使用的是 Ubuntu 10.10,这是 uname-a 输出:

Linux ygam-desktop 2.6.35-28-generic #49-Ubuntu SMP Tue Mar 1 14:40:58 UTC 2011 i686 GNU/Linux

我正在使用 Python 2.6

我已经遵循了以下指南:

http://appelfreelance.com/2010/06/libjpeg-pil-snow-leopard-python2-6-_jpeg_resync_to_restart/

http://www.jooncode.com/2010/12/02/python-pil-jpeg-resync-restart-error-imaging-module-solve/

http://djangodays.com/2008/09/03/django-imagefield-validation-error-caused-by-incorrect-pil-installation-on-mac/

最佳答案

在此处查看说明:Why can't Python find shared objects that are in directories in sys.path?

快速解决方法是将包含 libjpeg.so.8 的目录添加到您的 /etc/ld.so.conf 文件中,然后运行 ​​ ldconfig

关于python - PIL - libjpeg.so.8 : cannot open shared object file: No such file or directory,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5545580/

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