【发布时间】:2012-11-21 05:46:54
【问题描述】:
我正在尝试运行 python-connect-mysql 模块,但是当我在命令 shell 上执行 python setup.py install 时,我收到以下错误:
[Errno 13] 权限被拒绝:'/Library/Python/2.7/site-packages/test-easy-install-2259.write-test'
The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:
/Library/Python/2.7/site-packages/
我已安装 Python 3.2,需要安装到 /Library/Python/3.2/site-packages/
我查看了许多解决方案,但对命令 shell 不太了解。我尝试了以下方法来编辑我的 bash_profile 并收到一条错误消息,指出该文件不存在:sudo /Applications/TextEdit.app/Contents/MacOS/TextEdit ~/.bash_profile
然后我尝试了:touch ~/.bash_profile,但我一到那里就不知道该怎么做——我读的博客有非常粗略的说明——所以我点击退出,它让我退出了。
这似乎是我下载第三方软件包的最大障碍。我再次尝试sudo /Applications/TextEdit.app... 方法以查看终端是否允许我打开 bash_profile,因为我已触摸它并收到一条错误消息,提示我无权打开文件。有人可以帮忙吗?我要疯了!
【问题讨论】:
标签: python path include python-3.2