将Flask安装到我的OS X Maverick时出错

时间:2013-11-13 03:47:27

标签: python flask

我正在使用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.

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

1 个答案:

答案 0 :(得分:0)

我不是在mac.But根据我可怜的英语,如下所示,

  

>   也许您的帐户没有对此目录的写入权限?如果   安装目录是系统拥有的目录,您可能需要登录   作为管理员或“root”帐户。如果你没有行政管理   访问这台机器,您可能希望选择不同的安装   目录,最好是PYTHONPATH环境中列出的目录   变量

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