LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-27-2017, 12:57 PM   #1
giulia26
LQ Newbie
 
Registered: Apr 2017
Posts: 2

Rep: Reputation: Disabled
'No module named yum' error


Hi,

Scientific Linux 6
If I try to use yum I get the following message:

'import site' failed; use -v for traceback
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.6 (r266:84292, Nov 21 2013, 12:39:37)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-3)]

If you cannot solve this problem yourself, please go to
the yum faq at:
http://yum.baseurl.org/wiki/Faq



I can fix that with 'unset PYTHONHOME'
but then when I try to run python from the terminal I get:

Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
ImportError: No module named site



which python output:
/usr/local/canopy/bin/python

and PYTHONHOME is set to:
/usr/local/CanopyCore/appdata/canopy-1.1.0.1371.rh5-x86_64

I don't know what to do. Any suggestion?
Thanks!
 
Old 04-27-2017, 04:29 PM   #2
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,523

Rep: Reputation: 2619Reputation: 2619Reputation: 2619Reputation: 2619Reputation: 2619Reputation: 2619Reputation: 2619Reputation: 2619Reputation: 2619Reputation: 2619Reputation: 2619
did you by chance replace the DEFAULT!!! install of python

which python output:
/usr/local/canopy/bin/python

YOU DID , NOT GOOD

yum REQUIRES!!!! the version of python to be installed

the fix may or may not be easy if you did

and WHY are you trying to install a RHEL5 rpm on a rhel/cent/sl 6.9 install

most rhel5 things will NOT work on 6

you can manually extract the python rpm and manually " copy past" it into the correct places

SL 6.9 64 bit
http://ftp.scientificlinux.org/linux...4/os/Packages/
-- python-2.6.6-66.el6_8.x86_64.rpm --
 
Old 04-28-2017, 10:17 PM   #3
giulia26
LQ Newbie
 
Registered: Apr 2017
Posts: 2

Original Poster
Rep: Reputation: Disabled
Thanks for your reply!
I don't know why there is a RHEL5 python and yes, python has been replaced. It's a shared computer and I can't really do about it. I tried logging in with a different user that uses the same python and does not have PYTHONHOME set and both yum and python work fine. I am not sure what to look at to figure out why...
 
  


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
Broken Yum - No module named yum scratchyrat Linux - Software 1 03-22-2013 09:58 PM
yum and No module named CElementTree vitasis Linux - Software 12 09-08-2010 04:45 AM
problem when run yum (No module named yum) ezak Linux - Distributions 4 10-16-2009 04:04 AM
yum error: no module named rpm catbird Linux - Newbie 4 02-21-2008 09:55 AM
YUM no module named yum gimmee Fedora 7 12-06-2006 03:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:34 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
Open Source Consulting | Domain Registration