2014-01-21 91 views
0

我想在Bluehost帳戶上安裝Django。我使用了這些說明([http://devget.net/misc/installing-django-1-5-1-with-python-2-7-4-on-bluehost/][1])setuptools錯誤python27 setup.py install:只讀文件系統

I已經安裝了Python2.7.4。 我接着安裝setuptools:

cd ~ wget --no-check-certificate http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz tar xzvf setuptools-0.6c11.tar.gz cd setuptools-0.6c11

文件被下載得到,但是當我嘗試設置:

python27 setup.py install

I receive this error: running install 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 30] Read-only file system: '/usr/lib/python2.6/site-packages/test-easy-install-800.write-test' 

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

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

奇怪的是,/usr/lib/python2.6/site -packages /目錄不存在!我只有/usr/lib/python2.7/site-packages/

我該如何解決?謝謝!

回答

1

setuptools嘗試在共享主機上執行系統級(根)安裝。這是默認情況下setuptools的行爲。因爲你沒有root訪問權限,所以這是不可能的。

如果主機有任​​何virtualenv命令可以使用它。 Here are short guidelines how to perform local Python installations with virtualenv, without root

這裏是的情況下本地setuptools的安裝選項,你不能讓virtualenv'ed環境自舉出於某種原因:

Can I use setuptools without permissions to /usr/local etc

相關問題