You are not logged in.

#1 2011-03-19 16:35:59

darenw
Member
From: Trego Montana
Registered: 2008-07-04
Posts: 106
Website

Build wants Python2, sees Python3, gives up

Both python2 and python3 are installed on my Arch machine.  Plain generic "python" will normally run python3, which most of the time is fine with me.   But now I'm building a piece of open source software that uses python2.  It uses the usual ./configure ; make ; make install sequence.   The build crashes during configure apparently because it looks for python2 without being explicit about the '2', finds python3 doing business as "python", and gets confused.   

Is there a way to build this software that fools it into seeing "python" as python2?   It's probably not just the command "python" but paths and whatever else is uses.   

Later, I'll see if I can rework the source and build system to handle python3 and send the author a patch, but right now I'd like to get this built w/o any changes.

Last edited by darenw (2011-03-19 16:40:35)


Artist/Physicist, Herder of Pixels, Photons and Electrons

Offline

#2 2011-03-19 16:36:28

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,941
Website

Re: Build wants Python2, sees Python3, gives up

PYTHON=/usr/bin/python2 ./configure ...


Give what you have. To someone, it may be better than you dare to think.

Offline

#3 2011-03-19 16:44:47

darenw
Member
From: Trego Montana
Registered: 2008-07-04
Posts: 106
Website

Re: Build wants Python2, sees Python3, gives up

That env var looked like nice simple solution, but alas it has no effect. 

Here is the tail end of the configure script's output:

...
checking what language compliance flags to pass to the C compiler...
checking what warning flags to pass to the C++ compiler...
checking what language compliance flags to pass to the C++ compiler...
checking whether /usr/bin/python2 version >= 2.5... yes
checking for /usr/bin/python2 version... 2.7
checking for /usr/bin/python2 platform... linux2
checking for /usr/bin/python2 script directory... ${prefix}/lib/python2.7/site-packages
checking for /usr/bin/python2 extension module directory... ${exec_prefix}/lib/python2.7/site-packages
configure: error: Error: Dependency check failed


Artist/Physicist, Herder of Pixels, Photons and Electrons

Offline

#4 2011-03-19 17:17:55

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,941
Website

Re: Build wants Python2, sees Python3, gives up

@darenw maybe you want to paste the whole log + config.log ?


Give what you have. To someone, it may be better than you dare to think.

Offline

#5 2011-03-19 21:04:56

darenw
Member
From: Trego Montana
Registered: 2008-07-04
Posts: 106
Website

Re: Build wants Python2, sees Python3, gives up

I decided to just ditch that particular piece of software. Maybe try again in a few months. Perhaps it'll be Python3 compatible someday.


Artist/Physicist, Herder of Pixels, Photons and Electrons

Offline

#6 2011-03-19 22:07:53

Army
Member
Registered: 2007-12-07
Posts: 1,784

Re: Build wants Python2, sees Python3, gives up

Don't give up so fast, this is possible!!

Offline

#7 2011-03-19 22:15:28

Awebb
Member
Registered: 2010-05-06
Posts: 6,688

Re: Build wants Python2, sees Python3, gives up

Have a look how it's done in python2 stuff in the AUR. If they got a solution, you can too ;-)

Offline

#8 2011-03-19 23:26:51

vae77
Member
Registered: 2010-07-02
Posts: 75
Website

Re: Build wants Python2, sees Python3, gives up

Virtualenv + Virtualenv wrapper + pip are the killing feature you are looking for. Since I started developing python with it. I just can't go back.

Article: http://mathematism.com/2009/07/30/prese … irtualenv/

Last edited by vae77 (2011-03-19 23:27:38)

Offline

#9 2011-03-20 04:10:02

rockin turtle
Member
From: Montana, USA
Registered: 2009-10-22
Posts: 227

Re: Build wants Python2, sees Python3, gives up

It doesn't look to me that python2 vs. python3 is your problem.

From your configure script output:

checking for /usr/bin/python2 extension module directory... ${exec_prefix}/lib/python2.7/site-packages
configure: error: Error: Dependency check failed

It appears that configure is already looking in /usr/bin/python2 for dependencies.  The failure appears (to me anyway) due to a failure in
${exec_prefix}/lib/python2.7/site-packages.

Offline

#10 2011-06-16 09:58:16

Kooothor
Member
From: Paname
Registered: 2008-08-02
Posts: 228

Re: Build wants Python2, sees Python3, gives up

for the googlers passing by, if you want to make a build with python2, here is a way :

# rm /usr/bin/python
# ln -s /usr/bin/python2 /usr/bin/python

And it should work smile


ktr

Offline

#11 2011-06-16 10:06:36

Foucault
Member
From: Athens, Greece
Registered: 2010-04-06
Posts: 214

Re: Build wants Python2, sees Python3, gives up

Kooothor wrote:

for the googlers passing by, if you want to make a build with python2, here is a way :

# rm /usr/bin/python
# ln -s /usr/bin/python2 /usr/bin/python

And it should work smile

However you should never do that, because you have now broken all programs that require python3 as /usr/bin/python. It's a very bad practice to tamper manually with the directories that are managed by pacman (in this case /usr), or any package manager in fact. Eventually it will lead to breakages.

Offline

Board footer

Powered by FluxBB