python roll breaks yum

33 views
Skip to first unread message

nadya williams

unread,
Dec 14, 2017, 1:15:01 PM12/14/17
to rocks7-beta
Working on another roll stumbled on this problem
where 2 installations of python 2.7 do not co-exist:

[root@rocce-vm6 ~]# module list
No Modulefiles Currently Loaded.

[root@rocce-vm6 ~]# yum version
Loaded plugins: fastestmirror, langpacks
Installed: 7/x86_64                                                                                                                      1841:de8a3636bf859379b8849067f6cad07144388211
Group-Installed: yum                                                                                                                       14:bac853782e456a8ab662dc99a4d175fdef97a66e
version

[root@rocce-vm6 ~]# module load opt-python

[root@rocce-vm6 ~]# yum version
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.13 (default, Aug 10 2017, 12:50:11) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-11)]

If you cannot solve this problem yourself, please go to 
the yum faq at:
  
Unloading python module  restores yum but without setting libraries path one can’t
run  python from opt-python. The versions of  system python on which yum depends and
opt python differ :

System wide
# python
Python 2.7.5 (default, Nov  6 2016, 00:28:07) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-11)] on linux2

Opt-python
# module load opt-python
# python
Python 2.7.13 (default, Aug 22 2017, 07:39:17) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-11)] on linux2


There is no python 2.8 so we can’t just update python roll to the next version.
We had opt-python  in order to be able to keep 3 party packages and installs separate from the system-wide python.
This  means that anything that is installed in /opt/python for any roll dependent on opt-python will need a fix. 

nadya

Nadya Williams                 University of California, San Diego
nwil...@ucsd.edu         9500 Gilman Dr. MC 0444
+1 858 534 1820               La Jolla, CA 92093-0444, USA



Nadya Williams                 University of California, San Diego
nwil...@ucsd.edu         9500 Gilman Dr. MC 0444
+1 858 534 1820               La Jolla, CA 92093-0444, USA



Philip Papadopoulos

unread,
Dec 15, 2017, 4:01:19 PM12/15/17
to rocks7-beta
This means that if you are doing system work (yum), you MUST be using the system's version of  python.

Otherwise, load the opt-python module and go forward with that.

This doesn't appear to me to be a significant issue

-P
Reply all
Reply to author
Forward
0 new messages