uwsgi启动django,引入pymysql出错,No module named 'pymysql'

$ pip install pymysql
Requirement already satisfied: PyMySQL in /usr/local/lib/python3.6/site-packages

上面可见已经安装成功

但是引入的时候会报错:

ModuleNotFoundError: No module named 'pymysql'

解决方法:

在uwsgi.ini中添加

```
pythonpath=/usr/local/lib/python3.6/dist-packages
```

你可能感兴趣的:(uwsgi启动django,引入pymysql出错,No module named 'pymysql')