LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Older software version requires Python 2.5 to run. (https://www.linuxquestions.org/questions/linux-software-2/older-software-version-requires-python-2-5-to-run-926070/)

cov 01-27-2012 07:37 PM

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?

John VV 01-27-2012 10:19 PM

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

cov 01-27-2012 10:36 PM

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.

John VV 01-27-2012 10:57 PM

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

cov 01-27-2012 10:59 PM

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.

cov 01-27-2012 11:05 PM

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.

cov 01-27-2012 11:19 PM

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.

cov 01-27-2012 11:29 PM

Quote:

Originally Posted by cov (Post 4586448)
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


pyroscope 01-28-2012 04:39 AM

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.

cov 01-28-2012 05:04 AM

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

cov 01-28-2012 06:43 AM

Quote:

Originally Posted by pyroscope (Post 4586594)
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.

pyroscope 01-28-2012 11:01 AM

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.


All times are GMT -5. The time now is 10:54 AM.