Unable to install python-setuptools: ./configure: No such file or directory
Asked Answered
W

2

2

The question is related to the answer to "Unable to install Python without sudo access".

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

I get the following error when configuring

[~/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?

Wallacewallach answered 9/3, 2009 at 1:6 Comment(0)
V
2

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.

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 this should Just Work.

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

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

(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.)

Villeinage answered 9/3, 2009 at 4:22 Comment(1)
Oh, yeah, setup.py uses distutils :)Varicose
V
1

You might want to check http://peak.telecommunity.com/DevCenter/EasyInstall#custom-installation-locations.

EasyInstall is a python module with some shell scripts (or some shell scripts with a python module?) and does not use the unix make tool that gets configured with the "./configure" command. It looks like your best bet is to try editing ~/.pydistutils.cfg to include:

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

You'll also presumably have made the ~/.local/bin/ folder part of your PATH so you can run the easy_install script. (I'm not sure exactly where the site-packages directory will be under .local, but it shouldn't be hard to find.)

Hope this helps.

Varicose answered 9/3, 2009 at 1:34 Comment(1)
In my case, the first command needs to be install_lib = /home/masi/.local/lib/python2.6/site-packagesFroghopper

© 2022 - 2024 — McMap. All rights reserved.