2014-01-21 62 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

相关问题