gpt4 book ai didi

python - 在 python 2.6.4 中安装 SUDS

转载 作者:太空宇宙 更新时间:2023-11-03 23:50:15 26 4
gpt4 key购买 nike

我在 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 的站点包目录中创建一个 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

最佳答案

您是否尝试过将 PYTHONPATH 设置为 python 的位置?也许这样它就会知道在哪里安装它。

您正在使用 python setup.py install 调用它。尝试 sudo python setup.py install,如果您使用的是某些 linux 并且您是 sudoer。

关于python - 在 python 2.6.4 中安装 SUDS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2057380/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com