我在安装python 2.6.4中的SUDS时遇到了麻烦。我试图安装设置文件,但它说python的位置找不到。这是因为我改变了python的位置。我试图使用easy_install,但没有运气。有谁知道一个简单的方法来做到这一点或有一个链接来清除安装说明。我进入在python 2.6.4中安装SUDS
命令:
python setup.py install
我收到的结果是:
running install
error: cannot create or remove files in install directory
The following error occurred while trying to add or remove files in the
installation directory:
[Errno 13] Permission denied: '/usr/local/lib/python2.6/site-packages/test-easy-install-9203.write-test'
The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:
/usr/local/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
如果我必须要改变Python之路,你这样做究竟是如何做的。
我已经试过什么一个网站说的做,这是首先,创建Python的site-packages目录的altinstall.pth文件,其中包含以下行:
import os, site; site.addsitedir(os.path.expanduser('~/lib/python2.3'))
于是说修改的distutils。 cfg在distutils目录中:
[install]
install_lib = ~/lib/python2.3
# This next line is optional but often quite useful; it directs EasyInstall
# and the distutils to install scripts in the user's "bin" directory. For
# Mac OS X framework Python builds, you should use /usr/local/bin instead,
# because neither ~/bin nor the default script installation location are on
# the system PATH.
#
install_scripts = ~/bin
我们需要更多的信息,比如你在哪个平台上,确切的命令尝试,确切的错误报告等。 – 2010-01-13 14:43:10
@gruszczy谢谢,我不知道为什么我没有改变为超级用户。我认为这是造成问题的途径。有点傻,真的,谢谢你的帮助 – chrissygormley 2010-01-13 15:41:28
N/P。记住,如果你使用easy_install,你也需要做一个超级的。快乐黑客与泡沫:-) – gruszczy 2010-01-13 15:47:22