老师你好!
麻烦你看看这是什么问题?

uwsgi.log文件:
*** Starting uWSGI 2.0.18 (64bit) on [Sun Oct 18 18:01:18 2020] ***
compiled with version: 4.8.5 20150623 (Red Hat 4.8.5-39) on 18 October 2020 07:20:44
os: Linux-3.10.0-1127.el7.x86_64 #1 SMP Tue Mar 31 23:36:51 UTC 2020
nodename: localhost.localdomain
machine: x86_64
clock source: unix
pcre jit disabled
detected number of CPU cores: 1
current working directory: /pythoncodes/script
writing pidfile to /pythoncodes/script/uwsgi.pid
detected binary path: /pythoncodes/py3env/bin/uwsgi
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***
chdir() to /pythoncodes/netshop/
your processes number limit is 3795
your memory page size is 4096 bytes
detected max file descriptor number: 1024
!!! no /etc/mime.types file found !!!
lock engine: pthread robust mutexes
thunder lock: enabled
uWSGI http bound on 0.0.0.0:8000 fd 3
uwsgi socket 0 bound to UNIX address /pythoncodes/script/uwsgi.sock fd 6
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***
Python version: 3.8.2 (default, Oct 18 2020, 12:37:31) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]
PEP 405 virtualenv detected: /pythoncodes/py3env/
Set PythonHome to /pythoncodes/py3env/
Python main interpreter initialized at 0x1d5aca0
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***
python threads support enabled
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 486672 bytes (475 KB) for 5 cores
*** Operational MODE: preforking ***
Traceback (most recent call last):
File "/pythoncodes/py3env/lib/python3.8/site-packages/MySQLdb/__init__.py", line 18, in <module>
from . import _mysql
ImportError: libmysqlclient.so.18: cannot open shared object file: No such file or directory
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "./netshop/wsgi.py", line 16, in <module>
application = get_wsgi_application()
File "/pythoncodes/py3env/lib/python3.8/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
django.setup(set_prefix=False)
File "/pythoncodes/py3env/lib/python3.8/site-packages/django/__init__.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/pythoncodes/py3env/lib/python3.8/site-packages/django/apps/registry.py", line 114, in populate
app_config.import_models()
File "/pythoncodes/py3env/lib/python3.8/site-packages/django/apps/config.py", line 211, in import_models
self.models_module = import_module(models_module_name)
File "/usr/local/python38/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/pythoncodes/py3env/lib/python3.8/site-packages/django/contrib/auth/models.py", line 2, in <module>
from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager
File "/pythoncodes/py3env/lib/python3.8/site-packages/django/contrib/auth/base_user.py", line 47, in <module>
class AbstractBaseUser(models.Model):
File "/pythoncodes/py3env/lib/python3.8/site-packages/django/db/models/base.py", line 117, in __new__
new_class.add_to_class('_meta', Options(meta, app_label))
File "/pythoncodes/py3env/lib/python3.8/site-packages/django/db/models/base.py", line 321, in add_to_class
value.contribute_to_class(cls, name)
File "/pythoncodes/py3env/lib/python3.8/site-packages/django/db/models/options.py", line 204, in contribute_to_class
self.db_table = truncate_name(self.db_table, connection.ops.max_name_length())
File "/pythoncodes/py3env/lib/python3.8/site-packages/django/db/__init__.py", line 28, in __getattr__
return getattr(connections[DEFAULT_DB_ALIAS], item)
File "/pythoncodes/py3env/lib/python3.8/site-packages/django/db/utils.py", line 201, in __getitem__
backend = load_backend(db['ENGINE'])
File "/pythoncodes/py3env/lib/python3.8/site-packages/django/db/utils.py", line 110, in load_backend
return import_module('%s.base' % backend_name)
File "/usr/local/python38/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/pythoncodes/py3env/lib/python3.8/site-packages/django/db/backends/mysql/base.py", line 15, in <module>
import MySQLdb as Database
File "/pythoncodes/py3env/lib/python3.8/site-packages/MySQLdb/__init__.py", line 24, in <module>
version_info, _mysql.version_info, _mysql.__file__
NameError: name '_mysql' is not defined
unable to load app 0 (mountpoint='') (callable not found or import error)
*** no app loaded. going in full dynamic mode ***
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI master process (pid: 4079)
spawned uWSGI worker 1 (pid: 4081, cores: 1)
spawned uWSGI worker 2 (pid: 4082, cores: 1)
spawned uWSGI worker 3 (pid: 4083, cores: 1)
spawned uWSGI worker 4 (pid: 4084, cores: 1)
spawned uWSGI worker 5 (pid: 4085, cores: 1)
spawned uWSGI http 1 (pid: 4086)
--- no python application found, check your startup logs for errors ---
[pid: 4082|app: -1|req: -1/1] 192.168.126.1 () {38 vars in 737 bytes} [Sun Oct 18 10:10:11 2020] GET /admin => generated 21 bytes in 0 msecs (HTTP/1.1 500) 2 headers in 83 bytes (0 switches on core 0)
--- no python application found, check your startup logs for errors ---
[pid: 4083|app: -1|req: -1/2] 192.168.126.1 () {40 vars in 700 bytes} [Sun Oct 18 10:10:11 2020] GET /favicon.ico => generated 21 bytes in 0 msecs (HTTP/1.1 500) 2 headers in 83 bytes (0 switches on core 0)
--- no python application found, check your startup logs for errors ---
[pid: 4084|app: -1|req: -1/3] 192.168.126.1 () {38 vars in 737 bytes} [Sun Oct 18 10:10:11 2020] GET /admin => generated 21 bytes in 0 msecs (HTTP/1.1 500) 2 headers in 83 bytes (0 switches on core 0)
--- no python application found, check your startup logs for errors ---
[pid: 4081|app: -1|req: -1/4] 192.168.126.1 () {40 vars in 700 bytes} [Sun Oct 18 10:10:11 2020] GET /favicon.ico => generated 21 bytes in 0 msecs (HTTP/1.1 500) 2 headers in 83 bytes (0 switches on core 0)