我在 python 2.6.4 中安装 SUDS 时遇到了真正的麻烦。我试图安装安装文件,但它说找不到 python 的位置。这是因为我改变了python的位置。我曾尝试使用easy_install,但没有运气。有谁知道一个简单的方法来做到这一点或有一个链接来清除安装说明。
我输入的命令是:
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 目录中的 distutils.cfg :
[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