2011-02-05 58 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。