LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Need help in installing new python version.... (https://www.linuxquestions.org/questions/linux-software-2/need-help-in-installing-new-python-version-271758/)

Robert135 12-29-2004 10:22 PM

Need help in installing new python version....
 
I am fairly new to linux so any help may have to be verbose descriptive.

I have to use redhat 8 because of c and fortran compiler dependancies... and am getting problems installing the python numeric rpm.

Quote:

> rpm -ivh Numeric-23.6-1.i586.rpm
error: Failed dependencies:
python-base >= 2.3 is needed by Numeric-23.6-1
I am getting this error.. I understand I need to install a new version of python since Redhat 8.0 is version 2.2x ... so I have.

I downloaded version 2.4 from Active Python and installed it. The default location of the installation is /opt/ActivePython-2.4/bin so I used that.

Steps I have done:
I checked to see if there is an uninstall option in the redhat installation through grub... I cannot uninstall it this way since i do not have the option.

So

I renamed all of the executable python files to OLD_python.. etc in the usr/bin directory.
I have added an export command to the .bashrc file to add the /opt/... stuff to the env variables.
I added an alias to the /usr/bin directory named python to point to the new python executable in /opt/ActivePython/bin.

So when I open a shell and use python it grabs 2.4 and can execute commands on that python.

I don't know what python-base reffers to in the error message above. I do not know where to change it so it can default to the new 2.4. I also do not see why it would still see 2.2 installed since I have renamed the executables... and forwarded the executable link...

There are still a ton of python files in the /usr/lib/python2.2 and /usr/include/python2.2 directories I have not touched.... but I don't know if the RPM is refferencing these or not.


Any help would be very appreciated.


Thank you.

Robert

CroMagnon 12-30-2004 12:50 AM

The problem is when you downloaded Active Python, you bypassed the RPM database. RPM isn't smart enough to know what you've installed from other (non-RPM) packages, so it thinks you still haven't installed it. You have two options:
1) download the python-base rpm for 2.3 or 2.4 directly from redhat (check ftp.redhat.com or a local mirror)
2) trust that the activestate version of python is installed correctly and override RPMs dependency check. I think you can do this by adding either --no-deps or --force to the RPM command line (I forget exactly - type 'man rpm' and have a read through for the various options).

I recommend the first course, especially since you said you're new to this and, while I am sure ActiveState's version is very good, most of Redhat's software will have been tested with the vanilla Python from www.python.org.


All times are GMT -5. The time now is 05:53 PM.