无法安装pythonsetools:。/configure:没有此类文件或目录

2024-10-01 07:10:40 发布

您现在位置:Python中文网/ 问答频道 /正文

这个问题与the answer to "Unable to install Python without sudo access"有关。在

我需要安装python setuptools来安装python模块。 我已经提取了安装包。在

配置时出现以下错误

[~/wepapps/pythonModules/setuptools-0.6c9]# ./configure --prefix=/home/masi/.local
-bash: ./configure: No such file or directory

我在the program's homepage没有找到解决方案。在

如何解决此错误?在


Tags: 模块installthetoansweraccessconfigure错误
2条回答

正如Noah所说,setuptools不是一个automake包,所以不使用'./configure'。相反,它是一种纯粹的Python风格'设置.py'(distutils)脚本。在

你通常不需要玩。pydistutils.cfg,只要使用正确版本的Python运行它。因此,如果您还没有将.local/bin文件夹添加到PATH中,则必须显式地说:

/home/masi/.local/bin/python setup.py install

所有这些都应该管用。在

I did not find the solution at the program's homepage.

是的,他们希望你从一个shell脚本egg安装它,它使用Python的默认版本。你不想要的。在

(如果setuptools无法正常工作,另一种方法是跳过它,手动安装每个模块和依赖项。就我个人而言,我有点讨厌setuptools/egg,因为它包含了太多“聪明”的魔法,让我的文件系统一团糟。但我是个老顽固。大多数Python模块可以作为简单的Python文件或普通的distutils脚本获得,但不幸的是,有些模块需要鸡蛋

您可能需要检查http://peak.telecommunity.com/DevCenter/EasyInstall#custom-installation-locations。在

EasyInstall是一个带有一些shell脚本的python模块(或者一些带有python模块的shell脚本?)并且不使用用“./configure”命令配置的unix make工具。看来你最好的办法就是编辑~/。pydistutils.cfg包括:

[install]
install_lib = /home/masi/.local/lib/python/site-packages/
install_scripts = /home/masi/.local/bin

您可能还将~/.local/bin/文件夹作为路径的一部分,这样您就可以运行easy\u install脚本了。(我不确定site packages目录的确切位置。local,但应该不难找到。)

希望这有帮助。在

相关问题 更多 >