ImportError:path_to_venv / lib / python2.7 / site-packages / PIL / _imaging.so:未定义符号:PyString_FromStringAndSize

时间:2020-09-01 02:42:29

标签: python django python-imaging-library

[Tue Sep 01 10:36:25.566741 2020] [wsgi:error] [pid 19181:tid 140458551392000] [remote 119.247.226.9:52728] Traceback (most recent call last):
[Tue Sep 01 10:36:25.566824 2020] [wsgi:error] [pid 19181:tid 140458551392000] [remote 119.247.226.9:52728]   File "/root/jielong/fairy/wsgi.py", line 19, in <module>
[Tue Sep 01 10:36:25.566872 2020] [wsgi:error] [pid 19181:tid 140458551392000] [remote 119.247.226.9:52728]     application = get_wsgi_application()
[Tue Sep 01 10:36:25.566911 2020] [wsgi:error] [pid 19181:tid 140458551392000] [remote 119.247.226.9:52728]   File "/root/jielong/jielong_env/lib/python2.7/site-packages/django/core/wsgi.py", line 14, in get_wsgi_application
[Tue Sep 01 10:36:25.566946 2020] [wsgi:error] [pid 19181:tid 140458551392000] [remote 119.247.226.9:52728]     django.setup()
[Tue Sep 01 10:36:25.566984 2020] [wsgi:error] [pid 19181:tid 140458551392000] [remote 119.247.226.9:52728]   File "/root/jielong/jielong_env/lib/python2.7/site-packages/django/__init__.py", line 18, in setup
[Tue Sep 01 10:36:25.567019 2020] [wsgi:error] [pid 19181:tid 140458551392000] [remote 119.247.226.9:52728]     apps.populate(settings.INSTALLED_APPS)
[Tue Sep 01 10:36:25.567056 2020] [wsgi:error] [pid 19181:tid 140458551392000] [remote 119.247.226.9:52728]   File "/root/jielong/jielong_env/lib/python2.7/site-packages/django/apps/registry.py", line 108, in populate
[Tue Sep 01 10:36:25.567090 2020] [wsgi:error] [pid 19181:tid 140458551392000] [remote 119.247.226.9:52728]     app_config.import_models(all_models)
[Tue Sep 01 10:36:25.567128 2020] [wsgi:error] [pid 19181:tid 140458551392000] [remote 119.247.226.9:52728]   File "/root/jielong/jielong_env/lib/python2.7/site-packages/django/apps/config.py", line 198, in import_models
[Tue Sep 01 10:36:25.567184 2020] [wsgi:error] [pid 19181:tid 140458551392000] [remote 119.247.226.9:52728]     self.models_module = import_module(models_module_name)
[Tue Sep 01 10:36:25.567223 2020] [wsgi:error] [pid 19181:tid 140458551392000] [remote 119.247.226.9:52728]   File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
[Tue Sep 01 10:36:25.567257 2020] [wsgi:error] [pid 19181:tid 140458551392000] [remote 119.247.226.9:52728]     return _bootstrap._gcd_import(name[level:], package, level)
[Tue Sep 01 10:36:25.567295 2020] [wsgi:error] [pid 19181:tid 140458551392000] [remote 119.247.226.9:52728]   File "<frozen importlib._bootstrap>", line 994, in _gcd_import
[Tue Sep 01 10:36:25.567334 2020] [wsgi:error] [pid 19181:tid 140458551392000] [remote 119.247.226.9:52728]   File "<frozen importlib._bootstrap>", line 971, in _find_and_load
[Tue Sep 01 10:36:25.567372 2020] [wsgi:error] [pid 19181:tid 140458551392000] [remote 119.247.226.9:52728]   File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
[Tue Sep 01 10:36:25.567411 2020] [wsgi:error] [pid 19181:tid 140458551392000] [remote 119.247.226.9:52728]   File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
[Tue Sep 01 10:36:25.567449 2020] [wsgi:error] [pid 19181:tid 140458551392000] [remote 119.247.226.9:52728]   File "<frozen importlib._bootstrap_external>", line 678, in exec_module
[Tue Sep 01 10:36:25.567488 2020] [wsgi:error] [pid 19181:tid 140458551392000] [remote 119.247.226.9:52728]   File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
[Tue Sep 01 10:36:25.567526 2020] [wsgi:error] [pid 19181:tid 140458551392000] [remote 119.247.226.9:52728]   File "/root/jielong/accounts/models.py", line 6, in <module>
[Tue Sep 01 10:36:25.567561 2020] [wsgi:error] [pid 19181:tid 140458551392000] [remote 119.247.226.9:52728]     from userena.models import UserenaBaseProfile
[Tue Sep 01 10:36:25.567598 2020] [wsgi:error] [pid 19181:tid 140458551392000] [remote 119.247.226.9:52728]   File "/root/jielong/jielong_env/lib/python2.7/site-packages/userena/models.py", line 9, in <module>
[Tue Sep 01 10:36:25.567633 2020] [wsgi:error] [pid 19181:tid 140458551392000] [remote 119.247.226.9:52728]     from easy_thumbnails.fields import ThumbnailerImageField
[Tue Sep 01 10:36:25.567671 2020] [wsgi:error] [pid 19181:tid 140458551392000] [remote 119.247.226.9:52728]   File "/root/jielong/easy_thumbnails/fields.py", line 2, in <module>
[Tue Sep 01 10:36:25.567705 2020] [wsgi:error] [pid 19181:tid 140458551392000] [remote 119.247.226.9:52728]     from easy_thumbnails import files
[Tue Sep 01 10:36:25.567748 2020] [wsgi:error] [pid 19181:tid 140458551392000] [remote 119.247.226.9:52728]   File "/root/jielong/easy_thumbnails/files.py", line 14, in <module>
[Tue Sep 01 10:36:25.567782 2020] [wsgi:error] [pid 19181:tid 140458551392000] [remote 119.247.226.9:52728]     from easy_thumbnails import engine, exceptions, models, utils, signals, storage
[Tue Sep 01 10:36:25.567821 2020] [wsgi:error] [pid 19181:tid 140458551392000] [remote 119.247.226.9:52728]   File "/root/jielong/easy_thumbnails/engine.py", line 10, in <module>
[Tue Sep 01 10:36:25.567858 2020] [wsgi:error] [pid 19181:tid 140458551392000] [remote 119.247.226.9:52728]     from PIL import Image
[Tue Sep 01 10:36:25.567896 2020] [wsgi:error] [pid 19181:tid 140458551392000] [remote 119.247.226.9:52728]   File "/root/jielong/jielong_env/lib/python2.7/site-packages/PIL/Image.py", line 53, in <module>
[Tue Sep 01 10:36:25.567931 2020] [wsgi:error] [pid 19181:tid 140458551392000] [remote 119.247.226.9:52728]     from PIL import _imaging as core
[Tue Sep 01 10:36:25.567975 2020] [wsgi:error] [pid 19181:tid 140458551392000] [remote 119.247.226.9:52728] ImportError: /root/jielong/jielong_env/lib/python2.7/site-packages/PIL/_imaging.so: undefined symbol: PyString_FromStringAndSize

当我import_imaging时,好像出了点问题。但是当我在python解释器中手动导入它时:


Python 2.7.17 (default, Nov  7 2019, 10:07:09)
[GCC 7.4.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from PIL import _imaging as core
>>>


没有错误。

python = 2.7.17 枕头= 2.4.0

未安装PIL。

0 个答案:

没有答案
相关问题