在Mac OS 10.6上安装virtualenv时出错

时间:2010-11-12 06:33:41

标签: python command-line terminal virtualenv

当我尝试在运行OS 10.6.4的本地计算机上安装virtualenv时,我得到以下内容:

Searching for virtualenv
Reading http://pypi.python.org/simple/virtualenv/
Reading http://virtualenv.openplans.org
Best match: virtualenv 1.5.1
Downloading http://pypi.python.org/packages/source/v/virtualenv/virtualenv-1.5.1.tar.gz#md5=3daa1f449d5d2ee03099484cecb1c2b7
Processing virtualenv-1.5.1.tar.gz
Running virtualenv-1.5.1/setup.py -q bdist_egg --dist-dir /var/folders/Ej/EjJBMhPjFSWPq+RuE6ubhE+++TI/-Tmp-/easy_install-lZp_Mm/virtualenv-1.5.1/egg-dist-tmp-vC_6xR
warning: no previously-included files matching '*.*' found under directory 'docs/_templates'
Adding virtualenv 1.5.1 to easy-install.pth file
Installing virtualenv script to /usr/local/bin
error: /usr/local/bin: Permission denied

关于如何在最后解决错误的任何想法?

error: /usr/local/bin: Permission denied

查看我的/ usr / local目录,没有/ bin子目录。任何帮助都将非常感谢,谢谢!

1 个答案:

答案 0 :(得分:5)

您需要具有root权限才能安装到/ usr / local / bin中。如果您使用easy_install命令,请执行:

$ sudo easy_install virtualenv