Mac如何修改文件夾權限

續《如何卸載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:[email protected]

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章