Python执行ImportError:No module named MySQLdb异常
解决方法:
对于Linux来说,有多重包管理系统和安装机制。如果使用的是包含某种包管理器的Linux,那么可以很轻松的安装Python MySQLdb库。
Linux Fedora, CentOS系统:yum install MySQL-python
Linux Ubuntu操作系统:apt-get install python-mysqldb
sudo pip install
The directory '/home/hancool/.cache/pip' or its parent directory is not owned by the current user and the cache has been disabled.
Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
解决方法:
直接 pip install django,不用sudo,权限的问题,对后续使用不影响。不管是用pip装什么模块,前面都尽量不要加sudo
|
作者:Agoly 出处:https://www.cnblogs.com/qmfsun/ 本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。 如果文中有什么错误,欢迎指出。以免更多的人被误导。 |

浙公网安备 33010602011771号