2011-02-05 56 views
0
 
The following error occurred while trying to add or remove files in the 
installation directory: 

    [Errno 13] Permission denied: '/usr/local/lib/python2.6/dist-packages/test-easy-install-20294.pth' 

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

    /usr/local/lib/python2.6/dist-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. 

如何更改目录?或者我会如何改变它,以便它接受根目录中的更改?使用Python设置路径加载文件时出错问题

+0

哪个命令或代码导致您出现此错误?发表它。 – ulidtko

回答

0

最简单的方法是以管理员权限运行该命令。看起来你正在使用某种形式的Linux。在Ubuntu或者类似,使用方法:

sudo easy_install <package> 

否则,您可以使用一个选项:

easy_install -d /home/<username>/wherever <package> 

然后,你需要确保该目录使得它成为你的PYTHONPATH。