为了能快速了解并处理您的问题,请提供以下基础信息:
免费版8.0.0 mysql8.0
centos7.6
在添加后运行django项目时显示未安装mysqlclient,但是我已经在添加项目后安装了django和mysqlclient
显示已经安装mysqlclient
[root@iZuf6dpwfz92a4pavfx3atZ NFCAD]# pip3 install mysqlclient
Looking in indexes: https://mirrors.aliyun.com/pypi/simple
Requirement already satisfied: mysqlclient in /www/server/pyporject_evn/9705526ef8a122c21464121e8fe09689_venv/lib/python3.8/site-packages (2.2.0)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
但是执行makemigrations时报错
日志
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module.Did you install mysqlclient?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 master process (pid: 10740)spawned uWSGI worker 1 (pid: 10747, cores: 2)spawned uWSGI worker 2 (pid: 10748, cores: 2)spawned uWSGI worker 3 (pid: 10750, cores: 2)spawned uWSGI worker 4 (pid: 10751, cores: 2)spawned uWSGI http 1 (pid: 10752)
|
|