gpt4 book ai didi

django - ImportError : libjpeg. so.8: 无法打开共享对象文件: 没有这样的文件或目录

转载 作者:行者123 更新时间:2023-12-04 13:35:04 26 4
gpt4 key购买 nike

有一个类似的问题: PIL - libjpeg.so.8: cannot open shared object file: No such file or directory

但我得到的输出略有不同:

$ python manage.py               
Traceback (most recent call last):
File "manage.py", line 8, in <module>
execute_from_command_line(sys.argv)
File "some_virtualenv/lib/python3.5/site-packages/django/core/management/__init__.py", line 353, in execute_from_command_line
utility.execute()
File "some_virtualenv/lib/python3.5/site-packages/django/core/management/__init__.py", line 327, in execute
django.setup()
File "some_virtualenv/lib/python3.5/site-packages/django/__init__.py", line 18, in setup
apps.populate(settings.INSTALLED_APPS)
File "some_virtualenv/lib/python3.5/site-packages/django/apps/registry.py", line 108, in populate
app_config.import_models(all_models)
File "some_virtualenv/lib/python3.5/site-packages/django/apps/config.py", line 202, in import_models
self.models_module = import_module(models_module_name)
File "some_virtualenv/lib64/python3.5/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 986, in _gcd_import
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 665, in exec_module
File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
File "some_django_project/some_django_app/models.py", line 25, in <module>
from versatileimagefield.fields import VersatileImageField
File "some_virtualenv/lib/python3.5/site-packages/versatileimagefield/fields.py", line 11, in <module>
from .files import VersatileImageFieldFile, VersatileImageFileDescriptor
File "some_virtualenv/lib/python3.5/site-packages/versatileimagefield/files.py", line 11, in <module>
from .mixins import VersatileImageMixIn
File "some_virtualenv/lib/python3.5/site-packages/versatileimagefield/mixins.py", line 8, in <module>
from .datastructures import FilterLibrary
File "some_virtualenv/lib/python3.5/site-packages/versatileimagefield/datastructures/__init__.py", line 3, in <module>
from .sizedimage import SizedImage
File "some_virtualenv/lib/python3.5/site-packages/versatileimagefield/datastructures/sizedimage.py", line 11, in <module>
from .base import ProcessedImage
File "some_virtualenv/lib/python3.5/site-packages/versatileimagefield/datastructures/base.py", line 3, in <module>
from PIL import Image
File "some_virtualenv/lib/python3.5/site-packages/PIL/Image.py", line 66, in <module>
from PIL import _imaging as core
ImportError: libjpeg.so.8: cannot open shared object file: No such file or directory

我的 models.py 中的第 25 行:

from versatileimagefield.fields import VersatileImageField

Django 版本:

$ pip freeze | grep Django   
Django==1.9.5

Pillow 版:

$ pip freeze | grep Pillow
Pillow==3.2.0

系统:

$ uname -a                        
Linux zbookhack-gableroux-local 4.9.3-200.fc25.x86_64 #1 SMP Fri Jan 13 01:01:13 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

我的系统上安装了 libjpeg

$ sudo dnf install libjpeg
Package libjpeg-turbo-1.5.1-0.fc25.x86_64 is already installed, skipping.
Package libjpeg-turbo-1.5.1-0.fc25.i686 is already installed, skipping.
Dependencies resolved.
Nothing to do.
Complete!

最佳答案

Pillow3.3 及更高版本 中修复了此问题,升级包对我有用:)

pip install Pillow==4

pip install Pillow --upgrade

以下是 github 上的一些相关 Pillow 问题:

#1952 #2123 #2167

关于django - ImportError : libjpeg. so.8: 无法打开共享对象文件: 没有这样的文件或目录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41750209/

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