续《如何卸载canopy》
卸载canopy之后,重新安装了MySQLdb,当新建cursor时,会提示以下错误:
The Python egg cache directory is currently set to:
/Users/tyre77/.python-eggs
Perhaps your account does not have write access to this directory? You can
change the cache directory by setting the PYTHON_EGG_CACHE environment
variable to point to an accessible directory.
根据提示,原因是目前的用户没有权限访问.python-eggs,而数据库的缓存目录就在这里。
进入python shell时如果使用sudo,那么就不会提示以上错误,更验证了我的猜想。
先cd到.python-eggs目录。
cd /Users/tyre77/.python-eggs/
然后修改本文件夹的权限。
sudo chown -R 用户名
发现错误就没有了。
————————————————————
github主页:https://github.com/gt11799
E-mail:gting405@163.com