LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Reinstalling Python (https://www.linuxquestions.org/questions/linux-newbie-8/reinstalling-python-838370/)

Zeno McDohl 10-15-2010 03:34 PM

Reinstalling Python
 
I managed to create an issue with Python by using yum (multiple installs) and I want to fully reinstall Python.

Yum used to work just fine, but now the issue is this:
Quote:

[root@server23 Imaging-1.1.7]# yum
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.6.5 (r265:79063, Apr 9 2010, 15:16:58)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-48)]

If you cannot solve this problem yourself, please go to
the yum faq at:
http://wiki.linux.duke.edu/YumFaq
Also this error when trying to compile python-imaging:
Quote:

_imaging.c:75:20: error: Python.h: No such file or directory
Here is the Python stuff I have:
Quote:

[root@server23 Imaging-1.1.7]# whereis python
python: /usr/bin/python2.6 /usr/bin/python /usr/bin/python2.4 /usr/lib/python2.6 /usr/lib/python2.4 /usr/local/bin/python2.6-config /usr/local/bin/python2.6 /usr/local/bin/python /usr/local/lib/python2.6 /usr/include/python2.6 /usr/include/python2.4 /usr/share/man/man1/python.1.gz
How should I go about removing everything for Python and reinstalling Python 2.6 normally?

rweaver 10-15-2010 03:55 PM

Fall back to manually downloading the rpm files and installing (nee removing) them using the rpm command. It works independently of yum.

Zeno McDohl 10-15-2010 04:00 PM

I'm using CentOS 5, but I don't remember finding any rpms before when I was looking for them (so I ended up using yum). I'll look again.

Zeno McDohl 10-15-2010 06:52 PM

Okay, hoping someone can help with this.

I found these RPMs: http://www.geekymedia.com/uncategori...n-2-5-and-2-6/

Installed just fine. Then a module I was going to use wasn't working with this error: undefined symbol: PyUnicodeUCS2

Looking into it, I found this: http://effbot.org/pyfaq/when-importi...nicodeucs2.htm

I did that test and it resulted in UCS4. So the RPMs were UCS4? I need UCS2 so the modules work.

Thoughts?

Zeno McDohl 10-19-2010 02:00 PM

Anyone?


All times are GMT -5. The time now is 04:50 PM.