LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-15-2010, 04:34 PM   #1
Zeno McDohl
Member
 
Registered: Apr 2005
Location: Saratoga, NY
Distribution: Slackware
Posts: 316

Rep: Reputation: 30
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?
 
Old 10-15-2010, 04:55 PM   #2
rweaver
Senior Member
 
Registered: Dec 2008
Location: Louisville, OH
Distribution: Debian, CentOS, Slackware, RHEL, Gentoo
Posts: 1,833

Rep: Reputation: 164Reputation: 164
Fall back to manually downloading the rpm files and installing (nee removing) them using the rpm command. It works independently of yum.
 
Old 10-15-2010, 05:00 PM   #3
Zeno McDohl
Member
 
Registered: Apr 2005
Location: Saratoga, NY
Distribution: Slackware
Posts: 316

Original Poster
Rep: Reputation: 30
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.
 
Old 10-15-2010, 07:52 PM   #4
Zeno McDohl
Member
 
Registered: Apr 2005
Location: Saratoga, NY
Distribution: Slackware
Posts: 316

Original Poster
Rep: Reputation: 30
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?
 
Old 10-19-2010, 03:00 PM   #5
Zeno McDohl
Member
 
Registered: Apr 2005
Location: Saratoga, NY
Distribution: Slackware
Posts: 316

Original Poster
Rep: Reputation: 30
Anyone?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Python Python Python (aka Python 3) LXer Syndicated Linux News 0 08-05-2009 09:30 PM
LXer: Review: Programming in Python 3: A Complete Introduction to the Python Language LXer Syndicated Linux News 0 01-26-2009 05:50 AM
python update - Unable to load GTK2 Python bindings: No module named gtk itpedersen Linux - Software 2 10-03-2008 04:44 AM
[SOLVED] Reinstalling GRUB without Reinstalling my Distro MBA Whore Linux - Newbie 8 03-15-2008 09:39 PM
LXer: Move to python 2.4 / Changing the packaging style for python packages LXer Syndicated Linux News 0 06-13-2006 08:54 PM


All times are GMT -5. The time now is 02:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration