无法安装 python-setuptools: ./configure: No such file or directory [英] Unable to install python-setuptools: ./configure: No such file or directory

查看:71
本文介绍了无法安装 python-setuptools: ./configure: No such file or directory的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

该问题与无法在没有 sudo 访问权限的情况下安装 Python".

我需要安装 python-setuptools 来安装 python 模块.我已经解压了安装包.

I need to install python-setuptools to install python modules. I have extracted the installation package.

配置时出现以下错误

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

我在该程序的主页上没有找到解决方案.

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

我该如何解决这个错误?

How can I resolve this error?

推荐答案

正如 Noah 所说,setuptools 不是 automake 包,因此不使用./configure".相反,它是一个纯 Python 风格的setup.py"(distutils)脚本.

As Noah states, setuptools isn't an automake package so doesn't use ‘./configure’. Instead it's a pure-Python-style ‘setup.py’ (distutils) script.

您通常不需要使用 .pydistutils.cfg,只要您使用正确版本的 Python 运行它即可.因此,如果您尚未将 .local/bin 文件夹添加到 PATH,则必须明确说明:

You shouldn't normally need to play with .pydistutils.cfg, as long as you run it with the right version of Python. So if you haven't added the .local/bin folder to PATH, you'd have to say explicitly:

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

AIUI 这应该可以正常工作.

AIUI this should Just Work.

我在程序主页上没有找到解决方案.

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

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

Yeah, they want you to install it from a shell script egg which uses the default version of Python. Which you don't want.

(如果你不能让 setuptools 工作,另一种方法是跳过它并手动安装每个模块和依赖项.我个人对 setuptools/egg 有点反感,因为它包含太多聪明"的魔法符合我的口味并弄乱了我的文件系统.但我是一个老脾气暴躁的人.大多数 Python 模块都可以作为简单的 Python 文件或普通的旧 distutils 脚本获得,但不幸的是,一些需要鸡蛋.)

(Another approach if you can't get setuptools to work is to skip it and install each module and dependency manually. Personally I have a bit of an aversion to setuptools/egg, as it contains far too much "clever" magic for my tastes and makes a mess of my filesystem. But I'm an old curmudgeon like that. Most Python modules can be obtained as simple Python files or plain old distutils scripts, but unfortunately there are some that demand eggs.)

这篇关于无法安装 python-setuptools: ./configure: No such file or directory的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆