无法加载uWSGI插件:dlopen(./ python_plugin.so,10):找不到图像

时间:2018-05-09 03:33:25

标签: python django macos uwsgi

当我使用uwsgi连接

$ uwsgi --http :8000 --plugin python --module myProject.wsgi

我收到了轰鸣声错误:

  

!!! UNABLE to load uWSGI plugin: dlopen(./python_plugin.so, 10): image not found !!!

有完整的追溯:

(venv) MacBook-Pro:myProject ldl$ uwsgi --http :8000 --plugin python --module myProject.wsgi
!!! UNABLE to load uWSGI plugin: dlopen(./python_plugin.so, 10): image not found !!!
*** Starting uWSGI 2.0.17 (64bit) on [Wed May  9 11:24:54 2018] ***
compiled with version: 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.39.2) on 09 May 2018 02:32:54
os: Darwin-16.7.0 Darwin Kernel Version 16.7.0: Mon Nov 13 21:56:25 PST 2017; root:xnu-3789.72.11~1/RELEASE_X86_64
nodename: MacBook-Pro.local
machine: x86_64
clock source: unix
pcre jit disabled
detected number of CPU cores: 4
current working directory: /Users/sss/Desktop/QIYUN/Project/myProject
detected binary path: /Users/sss/Desktop/myProject/Project/myProject/venv/bin/uwsgi
*** WARNING: you are running uWSGI without its master process manager ***
your processes number limit is 709
your memory page size is 4096 bytes
detected max file descriptor number: 10240
lock engine: OSX spinlocks
thunder lock: disabled (you can enable it with --thunder-lock)
uWSGI http bound on :8000 fd 4
spawned uWSGI http 1 (pid: 5266)
uwsgi socket 0 bound to TCP address 127.0.0.1:54904 (port auto-assigned) fd 3
Python version: 3.5.2 (v3.5.2:4def2a2901a5, Jun 26 2016, 10:47:25)  [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)]
*** Python threads support is disabled. You can enable it with --enable-threads ***
Python main interpreter initialized at 0x7f82d9e00590
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 72888 bytes (71 KB) for 1 cores
*** Operational MODE: single process ***
Traceback (most recent call last):
  File "./myProject/wsgi.py", line 18, in <module>
    from 管理员后台.网站管理admin_website_chat.views import sio
  File "./管理员后台/网站管理/admin_website_chat/views.py", line 2, in <module>
    from 管理员后台.用户管理.admin_usermanage.models import User
  File "./管理员后台/用户管理/admin_usermanage/models.py", line 6, in <module>
    from django.contrib.auth.models import AbstractUser
  File "/Users/sss/Desktop/QIYUN/Project/myProject/venv/lib/python3.5/site-packages/django/contrib/auth/models.py", line 4, in <module>
    from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager
  File "/Users/sss/Desktop/myProject/Project/myProject/venv/lib/python3.5/site-packages/django/contrib/auth/base_user.py", line 52, in <module>
    class AbstractBaseUser(models.Model):
  File "/Users/sss/Desktop/myProject/Project/myProject/venv/lib/python3.5/site-packages/django/db/models/base.py", line 110, in __new__
    app_config = apps.get_containing_app_config(module)
  File "/Users/sss/Desktop/myProject/Project/myProject/venv/lib/python3.5/site-packages/django/apps/registry.py", line 247, in get_containing_app_config
    self.check_apps_ready()
  File "/Users/sss/Desktop/myProject/Project/myProject/venv/lib/python3.5/site-packages/django/apps/registry.py", line 125, in check_apps_ready
    raise AppRegistryNotReady("Apps aren't loaded yet.")
django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet.
unable to load app 0 (mountpoint='') (callable not found or import error)
*** no app loaded. going in full dynamic mode ***
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI worker 1 (and the only) (pid: 5265, cores: 1)

我的电脑是Macbook Pro 2015。

1 个答案:

答案 0 :(得分:0)

删除选项 --plugin python ,错误应消失。