Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Python Redhat version issue

Python Redhat version issue

Problem

Possible Duplicate:
Upgrade Python without breaking yum

I'm running a Redhat VM (2.6.18-274.el5 64 bit). I Installed nodejs on the vm in order to use browserstack. To get nodejs running I had to upgrade Python to 2.6 or above. I installed 2.7 from source using make altinstall. Then I createda hard-link to point from 2.4 to 2.7. Checking the python -V now shows 2.7 being the default. That all worked out fine and node is now up and running.

There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:

   No module named yum

Please install a package which provides this module, or
verify that the module is installed correctly.

It's possible that the above module doesn't match the
current version of Python, which is:
2.7.2 (default, Jul  2 2012, 23:35:52) 
[GCC 4.1.2 20080704 (Red Hat 4.1.2-51)]

If you cannot solve this problem yourself, please go to 
the yum faq at:
  http://wiki.linux.duke.edu/YumFaq

My problem is Yum. It's no longer working as its looking for the older version of Python which is 2.4? Is there anyway I can have both of them working as in Yum and node both using different versions?

Problem courtesy of: DanyZift

Solution

There are two issues here. One is that you broke your system python. Yum is installed in the python's site packages. If you damage python, yum will break. Breaking the system python installation is a stupid idea. Maybe you made backups, or have another sister machine from which you can transplant the original 2.4 python.

The other issue is that there is no problem with having several pythons on the same machine. To install Node.js you must simply tell it which python to use. Set PYTHON=/opt/local/my/path/to/python2.7/bin/python, possibly PYTHONHOME as well, before running ./configure .

Solution courtesy of: Tadeusz A. Kadłubowski

Discussion

View additional discussion.



This post first appeared on Node.js Recipes, please read the originial post: here

Share the post

Python Redhat version issue

×

Subscribe to Node.js Recipes

Get updates delivered right to your inbox!

Thank you for your subscription

×