LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 01-27-2012, 08:37 PM   #1
cov
Member
 
Registered: Apr 2005
Location: Durban
Posts: 380

Rep: Reputation: 30
Question Older software version requires Python 2.5 to run.


Hi, I'm running Linux Mint 64 which is a derivitive of Ubuntu, itself a derivitive of Debian.

I need to run an older version of Blender (2.49b) which is compiled with Python2.5. Starting Blender generates the following error:

Code:
dave@Pippin~/Apps $ blender2.49/blender
blender2.49/blender: error while loading shared libraries: libpython2.5.so.1.0: cannot open shared object file: No such file or directory

I have Python2.6, Python 2.7 and Python 3.2 installed on the system.

I have downloaded Python 2.5.4 and installed it from source using configure, make and make install as the apt-get package repository no longer provides this.

Can anyone suggest a way to make Pthon2.5 available to Blender?
 
Old 01-27-2012, 11:19 PM   #2
John VV
Guru
 
Registered: Aug 2005
Posts: 13,264

Rep: Reputation: 1774Reputation: 1774Reputation: 1774Reputation: 1774Reputation: 1774Reputation: 1774Reputation: 1774Reputation: 1774Reputation: 1774Reputation: 1774Reputation: 1774
an older version of python can be installed along side a current version BUT YOU MUST take care NOT TO MIX them together !!!


install 2.5 into it's OWN folder something like /usr/opt/python25
then point blender 249 to use that version

you might need to write a start up shell script to export that location of the python2.5 to blender.

Quote:
configure, make and make install
it you did that you just messed up your system BIG TIME
you replaced the current and NEEDED version with a old and compatible version
NOT GOOD

you might have FUBARED the system
run
Code:
make uninstall
from the 2.5 folder and manually force the reinstall of the correct python from the repo

for the location i posted above ( /usr/opt/python25)

the commands would have looked something like this
Code:
cd /location/of/python25/ 
./configure --prefix= /usr/opt/python25 /* fallowed by about 1 to 10 other build options */ 
make -j2 ( or use j4 if a quad core cpu or -j8 if you have 8 cores in the cpu ) 
su
make install
you might want to get into the HABIT of READING the output of this first
Code:
./configure --help
most major programs have a help menu

Last edited by John VV; 01-27-2012 at 11:20 PM.
 
Old 01-27-2012, 11:36 PM   #3
cov
Member
 
Registered: Apr 2005
Location: Durban
Posts: 380

Original Poster
Rep: Reputation: 30
Hi, John, thanks for your help.

The machine is specifically for running this software; if it's FUBARRED, then that's tough. My option will be to scrub it and start again.

make uninstall produces the following error:

Code:
make uninstall
make: *** No rule to make target `uninstall'.  Stop.
Incidently, I read the output of ./configure help and indeed, all the READMEs I could find and I was unable to get assistance on this.

My original question remains unanswered, namely how to point the Blender 2.49 at the 2.5 Python install.
 
Old 01-27-2012, 11:57 PM   #4
John VV
Guru
 
Registered: Aug 2005
Posts: 13,264

Rep: Reputation: 1774Reputation: 1774Reputation: 1774Reputation: 1774Reputation: 1774Reputation: 1774Reputation: 1774Reputation: 1774Reputation: 1774Reputation: 1774Reputation: 1774
I am running 2.6.1 right now so (python 3.2)

there should be a start up script in ~/.blender

the 2.5 and 2.6 blender have them in ~/.blender/2.5 or ~/.blender/2.6

Quote:
make uninstall
make: *** No rule to make target `uninstall'. Stop.
if you got that then you were NOT in the python2.5 build folder
the folder that you ran "make" in


also what version of 2.49 is this ?There are 4 linux versions
http://download.blender.org/release/Blender2.49b/

and all have the 2.5 python already in the archive
or is this the very old .deb file for ubuntu 9.04
 
Old 01-27-2012, 11:59 PM   #5
cov
Member
 
Registered: Apr 2005
Location: Durban
Posts: 380

Original Poster
Rep: Reputation: 30
Bearing in mind that all the versions of Python are completely incompatible with each other and, bearing in mind that, even before I FUBARRED my system (which I've yet to see any evidence of, by the way), there were three different versions of Python running side by side, then it strikes me that there should be a way of installing an additional version without interfering with those instances of Python.

Or am I giving rather too much credit to the developers? I certainly never saw any warning on the Python website (which certainly doesn't mean that it isn't there).

Furthermore, if there are three different versions of Python running on my system, then surely they are there because software incorporated into the distro requires a specific version to run? Which would imply that there should be a way of specifying which version that software should be using.

Which is actually what I want to know.
 
Old 01-28-2012, 12:05 AM   #6
cov
Member
 
Registered: Apr 2005
Location: Durban
Posts: 380

Original Poster
Rep: Reputation: 30
Hi, John thanks again for your assistance.

I changed to the build folder and ran make uninstall and indeed, I got that message.

I have run ./configure --prefix /usr/opt/python2.5 as you suggested from the same directory without error.
 
Old 01-28-2012, 12:19 AM   #7
cov
Member
 
Registered: Apr 2005
Location: Durban
Posts: 380

Original Poster
Rep: Reputation: 30
The version of Blender 2.49 is the 64 bit with Python2.5 tar files. The deb files would not install because of the existence of Blender 2.5 on the machine.

The Python2.6 version works, but complains of missing os module when I run the plugin:

Code:
    import sys, os
ImportError: No module named os
Google suggests that changing to Python 2.5 will remedy this.

Last edited by cov; 01-28-2012 at 12:23 AM.
 
Old 01-28-2012, 12:29 AM   #8
cov
Member
 
Registered: Apr 2005
Location: Durban
Posts: 380

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by cov View Post
Hi, John thanks again for your assistance.

I changed to the build folder and ran make uninstall and indeed, I got that message.

I have run ./configure --prefix /usr/opt/python2.5 as you suggested from the same directory without error.
Strangely enough make (or make -j2) does not work after using the prefix as you suggested.

Code:
make -j2
case $MAKEFLAGS in \
	*-s*)  CC='gcc -pthread' LDSHARED='gcc -pthread -shared' OPT='-DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes' ./python -E ./setup.py -q build;; \
	*)  CC='gcc -pthread' LDSHARED='gcc -pthread -shared' OPT='-DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes' ./python -E ./setup.py build;; \
	esac
running build
running build_ext
INFO: Can't locate Tcl/Tk libs and/or headers
building 'crypt' extension
gcc -pthread -fPIC -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -I/home/dave/Apps/Python-2.5.6/./Include -I. -IInclude -I./Include -I/usr/local/include -I/home/dave/Apps/Python-2.5.6/Include -I/home/dave/Apps/Python-2.5.6 -c /home/dave/Apps/Python-2.5.6/Modules/cryptmodule.c -o build/temp.linux-x86_64-2.5/home/dave/Apps/Python-2.5.6/Modules/cryptmodule.o
gcc -pthread -shared build/temp.linux-x86_64-2.5/home/dave/Apps/Python-2.5.6/Modules/cryptmodule.o -L/lib -L/usr/local/lib -o build/lib.linux-x86_64-2.5/crypt.so
*** WARNING: renaming "crypt" since importing it failed: build/lib.linux-x86_64-2.5/crypt.so: undefined symbol: crypt
building 'nis' extension
gcc -pthread -fPIC -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -I/home/dave/Apps/Python-2.5.6/./Include -I. -IInclude -I./Include -I/usr/local/include -I/home/dave/Apps/Python-2.5.6/Include -I/home/dave/Apps/Python-2.5.6 -c /home/dave/Apps/Python-2.5.6/Modules/nismodule.c -o build/temp.linux-x86_64-2.5/home/dave/Apps/Python-2.5.6/Modules/nismodule.o
gcc -pthread -shared build/temp.linux-x86_64-2.5/home/dave/Apps/Python-2.5.6/Modules/nismodule.o -L/lib -L/usr/local/lib -o build/lib.linux-x86_64-2.5/nis.so
*** WARNING: renaming "nis" since importing it failed: build/lib.linux-x86_64-2.5/nis.so: undefined symbol: yp_master
running build_scripts
However, 2.5 is indeed installed:

Code:
python -v
# installing zipimport hook
import zipimport # builtin
# installed zipimport hook
# /usr/local/lib/python2.5/site.pyc matches /usr/local/lib/python2.5/site.py
 
Old 01-28-2012, 05:39 AM   #9
pyroscope
LQ Newbie
 
Registered: Jan 2012
Distribution: Debian / Ubuntu
Posts: 12

Rep: Reputation: 1
The easiest way to install and manage additional Python versions is https://github.com/utahta/pythonbrew

Wherever and however you install, you have to adapt the startup script that Blender uses, in order to use the right interpreter. This is normally easy, but people can also mess things up and make it hard.
 
Old 01-28-2012, 06:04 AM   #10
cov
Member
 
Registered: Apr 2005
Location: Durban
Posts: 380

Original Poster
Rep: Reputation: 30
Nice idea.

However Pythonbrew installation fails with the following error:

Code:
curl -kL http://xrl.us/pythonbrewinstall | bash
Traceback (most recent call last):
  File "/usr/lib/command-not-found", line 17, in <module>
    from CommandNotFound.util import crash_guard
ImportError: No module named CommandNotFound.util
Possibly because of my now BORKED system.
 
Old 01-28-2012, 07:43 AM   #11
cov
Member
 
Registered: Apr 2005
Location: Durban
Posts: 380

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by pyroscope View Post
The easiest way to install and manage additional Python versions is https://github.com/utahta/pythonbrew

Wherever and however you install, you have to adapt the startup script that Blender uses, in order to use the right interpreter. This is normally easy, but people can also mess things up and make it hard.
Can you let me have some more information on this?

Where is the blender startup script? What is it called?

Funny, but searching Google gives me no answers on this (apart from "right-click on the My Computer icon" and various other Microsoft fixes); I must be using the wrong search keywords.
 
Old 01-28-2012, 12:01 PM   #12
pyroscope
LQ Newbie
 
Registered: Jan 2012
Distribution: Debian / Ubuntu
Posts: 12

Rep: Reputation: 1
I know nothing about blender. If is is pure Python, it WILL have a startup script. If it is C and EMBEDS an interpreter, then your original error means your LD_LIBRARY_PATH needs tweaking, and "ldd" is your friend.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need to match older machine to an older version of Linux fredb47 Linux - Distributions 10 10-27-2011 12:08 PM
installing newer software from source when older version installed from a slackbuild Cultist Slackware 3 01-04-2011 05:07 PM
Version requires old depmod, but couldn't run /sbin/depmod.old: No such file or dir jiobo Linux - Software 0 12-04-2008 03:53 AM


All times are GMT -5. The time now is 07:57 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration