You are not logged in.
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
PYTHON=/usr/bin/python2 ./configure ...
Give what you have. To someone, it may be better than you dare to think.
Offline
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
@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
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
Don't give up so fast, this is possible!!
Offline
Have a look how it's done in python2 stuff in the AUR. If they got a solution, you can too ;-)
Offline
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
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
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
ktr
Offline
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/pythonAnd it should work
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