尝试使用 Django 创建简单数据库时出现以下错误。我是这台计算机上的唯一用户,所以我应该是管理员。我如何才能获得权限以便 Django 可以做它的事情?
这里还有一些错误:
[Errno 13] Permission denied: '/Users/tyre77/.python-eggs/simplejson-2.1.6-py2.7-macosx-10.7-intel.egg-tmp/simplejson/tmpUxM60A.$extract'
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.
最佳答案
文件似乎由root拥有,并且组工作人员无权写入这些文件/目录,并且您不是root。
尝试更改这些文件的所有者:sudo chown -R tyre77/Users/tyre77/.python-eggs/
也许您已经使用 sudo 命令安装了该模块,因此这些文件是使用 root 权限创建的。
关于python - .python-eggs 权限被拒绝,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7258776/