
解決方法:
對於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
