Easy way to install Python 2.5 or higher on YDL 6.2?

Discuss software development issues here.

Easy way to install Python 2.5 or higher on YDL 6.2?

Postby Duraace » 17 Dec 2009, 13:44

Hi, i'm new in this forum and i have a question:

I want to install GNU Radio 3.2.2 under YDL 6.2 on a PlayStation 3.
Therefore i need at least Python 2.5! But YDL 6.2 brings along only version 2.4.3 of Python.

Now my question: Is there an easy way to install Python 2.5 or higher on YDL 6.2? Is there already a compiled version fo Python 2.5 as rpm or similar?

Thanks for advice! :)
Duraace
ydl newbie
ydl newbie
 
Posts: 4
Joined: 17 Dec 2009, 13:34

Re: Easy way to install Python 2.5 or higher on YDL 6.2?

Postby spykez » 19 Dec 2009, 12:31

Duraace wrote:Hi, i'm new in this forum and i have a question:

I want to install GNU Radio 3.2.2 under YDL 6.2 on a PlayStation 3.
Therefore i need at least Python 2.5! But YDL 6.2 brings along only version 2.4.3 of Python.

Now my question: Is there an easy way to install Python 2.5 or higher on YDL 6.2? Is there already a compiled version fo Python 2.5 as rpm or similar?

Thanks for advice! :)


Hmm... I've not done it, I'll be the first to admit but I was about to suggest a parallel install, so as you don't hose YDL 6.2 if the newer python breaks critical scripts in it that require the default python. I would suggest heeding the great install guide on this board and not trying to use rpm repositories that the boys here do not recommend.

It looks like the python guys have thought about this probably very common 'need', though :

http://www.python.org/doc/2.6.4/install/index.html#alternate-installation-unix-the-prefix-scheme

The link is mainly about modules but it alludes to a separate install existing on /usr/local (YDLs python resides on /usr) so that must be the way most other people do it. I do not have a better link in my brief period of googling :(

I do not know enough about rpms to know if you can specify where they install to (my guess is probably not), so you are likely going to have to build from source... I suspect. That page could give you an idea on what to pass to configure. I believe you will build to /usr/local by default, the way the tools on YDL6.2 are set up but you can make doubly sure by passing --prefix. Then you build and install it, and I suspect it's then it's all a matter of letting your GNU Radio package know where your new python is. You may have to build that package from source too, if the rpm package does not know where your new python is or cannot be told where it is.

I just hope the new python you're building itself doesn't have any unmet dependencies as well.. ie I hope it doesn't ask for a new glibc for example. If it does... things... err... get a little bit more interesting.

If you're really paranoid like me (and that's probably not a bad thing :) ), you'll probably want to back your whole system up before trying it, just in case you cause irrecoverable chaos.

I find (re)installing YDL a bit tiresome, so I have a few 'images' of my system backed up. I usually just dd it onto an external usb drive. Yes, I have hosed my system a number of times! :lol: Conveniently, my PS3 has a small HD, having snapshots like these allow you to wipe your onboard linux partitions out with little or no hesitation to try other distros or other partitioning patterns etc..., knowing that if you want a restore, you can just dd (and wait...) it back to just what you liked in the past. I put up the way I dd my HD recently here http://www.yellowdog-board.com/viewtopic.php?f=5&t=6940&p=35180#p35180 - it is wasteful in that you dd the whole drive, yes, there are other ways, but this is probably more convenient in that you don't have to worry about repartitioning/reformatting the partitions when you restore.

So err.. sorry, yeah, I know I haven't given you an exact specific recipe, but I hope this helps :)

Cheers,
Rob
spykez
ydl beginner
ydl beginner
 
Posts: 27
Joined: 04 Dec 2009, 04:20

Re: Easy way to install Python 2.5 or higher on YDL 6.2?

Postby spykez » 19 Dec 2009, 13:07

Duraace wrote:Hi, i'm new in this forum and i have a question:

I want to install GNU Radio 3.2.2 under YDL 6.2 on a PlayStation 3.
Therefore i need at least Python 2.5! But YDL 6.2 brings along only version 2.4.3 of Python.

Now my question: Is there an easy way to install Python 2.5 or higher on YDL 6.2? Is there already a compiled version fo Python 2.5 as rpm or similar?

Thanks for advice! :)


This link may also be helpful to illustrate what I mean. It's ubuntu/debian specific but you can generalize the principles.

http://achinghead.com/archive/83/installing-multiple-versions-python/

Cheers

Rob
spykez
ydl beginner
ydl beginner
 
Posts: 27
Joined: 04 Dec 2009, 04:20

Re: Easy way to install Python 2.5 or higher on YDL 6.2?

Postby Duraace » 19 Dec 2009, 13:17

Thanks for your links and advice! I will try it!
But two versions of Python parallel will bring many Problems, i think. There are so many dependencies installing Python, but i will try it anyway!

Thanks
Duraace
ydl newbie
ydl newbie
 
Posts: 4
Joined: 17 Dec 2009, 13:34

Re: Easy way to install Python 2.5 or higher on YDL 6.2?

Postby spykez » 20 Dec 2009, 00:24

Duraace wrote:Thanks for your links and advice! I will try it!
But two versions of Python parallel will bring many Problems, i think. There are so many dependencies installing Python, but i will try it anyway!

Thanks


That is a possibility (problems) if they collide. If they don't, you're probably okay. Which is why I think backing up is a good idea before you do the 'make install' :) Just in case you mess up and you hose your /usr

I have quite successfully built gcc-4.4.2 into the main YDL install by just changing the version number so it didn't collide with the default gcc. Mind you there were a few dependencies I had to fix. I chose to modify the base install in this case with a few gambles ie I had to fix the assembler to accept 'cell' as a valid cpu type, but I predicted this would not compromise stability with the current system, rationalising that it was only the assembler (sometimes you are wrong, sometimes you are right...) and so far... it's been ok.

For your python, if you have to upgrade some core libs that the YDL base system uses however, that could really be problematic. You might get way by building to /usr/local/lib.

Hmm.. you know what? Now I'm interested. Been meaning to learn a bit more about python anyways, when I next get free time, I shall attempt to install 2.6.x and 3.x. I shall let you know.

Cheers

Rob
spykez
ydl beginner
ydl beginner
 
Posts: 27
Joined: 04 Dec 2009, 04:20

Re: Easy way to install Python 2.5 or higher on YDL 6.2?

Postby CronoCloud » 23 Dec 2009, 16:32

It's easy to install multiple versions of python in parallel, it's a make option. from the README:

Code: Select all
Installing multiple versions
----------------------------

On Unix and Mac systems if you intend to install multiple versions of Python
using the same installation prefix (--prefix argument to the configure
script) you must take care that your primary python executable is not
overwritten by the installation of a different versio.  All files and
directories installed using "make altinstall" contain the major and minor
version and can thus live side-by-side.  "make install" also creates
${prefix}/bin/python which refers to ${prefix}/bin/pythonX.Y.  If you intend
to install multiple versions using the same prefix you must decide which
version (if any) is your "primary" version.  Install that version using
"make install".  Install all other versions using "make altinstall".

For example, if you want to install Python 2.5, 2.6 and 3.0 with 2.6 being
the primary version, you would execute "make install" in your 2.6 build
directory and "make altinstall" in the others.


You shouldn't have to update any libs to install a 2.6 and/or 3.foo Python. I had them installed on YDL 6.1, no problem, using the make altinstall option.

Ron Rogers Jr. (CronoCloud)
CECHE01 PS3 (MGS4 80GB Bundle) without OtherOS and with an upgraded 320GB HD
Running Fedora 23 on a Compaq Presario CQ5320F upgraded with a Phenom X4 and GT640
Vizio E221A1 22" 1080P TV with HDMI, using 1080P over HDMI
PSN ID: CronoCloudAuron
User avatar
CronoCloud
Moderator
Moderator
 
Posts: 523
Joined: 21 Oct 2006, 05:48
Location: Central Illinois, USA

Re: Easy way to install Python 2.5 or higher on YDL 6.2?

Postby spykez » 24 Dec 2009, 13:51

CronoCloud wrote:It's easy to install multiple versions of python in parallel, it's a make option. from the README:


Haha. Thanks for that, you just saved me from myself :P

Rob
spykez
ydl beginner
ydl beginner
 
Posts: 27
Joined: 04 Dec 2009, 04:20

Re: Easy way to install Python 2.5 or higher on YDL 6.2?

Postby billb » 04 Jan 2010, 09:13

I've built some Python 3.1 RPMs that install parallel to YDL 6.2's existing Python 2.4.3. They were rebuilt from the source RPMs from the IUS Community Project (http://iuscommunity.org/) which provides Python 3.1 for RHEL/Centos.

They are available for download here:

http://pleasantfiction.ipower.com/bodeg ... 3384#p3384
PS3 60GB [CECHA01], FW 3.15, YDL 6.2, Samsung T260HD @ 1920x1200
Powermac G4 1.25 GHz x2, 2 GB RAM, YDL 6.2
User avatar
billb
Site Admin
Site Admin
 
Posts: 5522
Joined: 24 May 2007, 20:30
Location: Eastern NC, USA

Re: Easy way to install Python 2.5 or higher on YDL 6.2?

Postby Duraace » 07 Jan 2010, 10:38

Thank you for your conclusion and the built Python RPMs! I will try it soon as possible installing Python 3.1 parallel to the existing version.
I think you managed it successfully! :)
I let you know when it works. Thanks for it!
Duraace
ydl newbie
ydl newbie
 
Posts: 4
Joined: 17 Dec 2009, 13:34

Re: Easy way to install Python 2.5 or higher on YDL 6.2?

Postby Duraace » 18 Jan 2010, 19:10

I got it!
Now i managed it, that Python 2.4.3 and Python 2.6.4 are running parallel.

But now i have another Problem: the yum packet-manager has numpy 1.2 in his repository. When i install numpy, it will be installed for Python 2.4.3 what is logical. I tried to build numpy 1.3 for Python 2.6 but i got errors.

Is there any chance to tell Python 2.6 that Numpy is already installed over YUM packet-manager?
Duraace
ydl newbie
ydl newbie
 
Posts: 4
Joined: 17 Dec 2009, 13:34


Return to Software Development

Who is online

Users browsing this forum: No registered users and 1 guest