1

我正在使用 Merverick OSX。我已将 Python 3.3.3 安装到我的计算机中,我想安装 Flask

当我在终端中输入这个

$ sudo pip install virtualenv

它说找不到命令

所以我试试这个

$sudo easy_install virtualenv

终端向我显示此错误

error: can't create or remove files in install directory

The following error occurred while trying to add or remove files in the
installation directory:

[Errno 13] Permission denied: '/Library/Python/2.7/site-packages/test-easy-install-    
373.write-test'

The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

/Library/Python/2.7/site-packages/

Perhaps your account does not have write access to this directory?  If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or "root" account.  If you do not have administrative
access to this machine, you may wish to choose a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.

For information on other options, you may wish to consult the
documentation at:

http://peak.telecommunity.com/EasyInstall.html

Please make the appropriate changes for your system and try again.

这些错误消息是什么意思?

4

1 回答 1

0

我不在mac。但根据我糟糕的英语,如下所示,

也许您的帐户没有对该目录的写入权限?如果安装目录是系统拥有的目录,您可能需要使用“sudo su”以管理员或“root”帐户登录。如果您没有对此机器的管理访问权限,您可能希望选择一个不同的安装目录,最好是 PYTHONPATH 环境变量中列出的一个。

这意味着您无权写入文件'/Library/Python/2.7/site-packages/test-easy-install-xxxx。并且终端告诉您使用root帐户安装。对 '/Library/Python/2.7/site-packages/*' 执行 chmod a+x 所以我希望它对你有用,请详细阅读终端所说的内容:)

于 2013-11-13T04:03:50.403 回答