vMX
vMX

vMX on CentOS - pyyaml problem

‎06-29-2017 11:50 PM

Hi Guys,

I need some assistance. i am folowing the vMX install manual to the letter for deploying vMX on Centos. It is a brand new install with CentOS7., Yet I get stuck at the following command

 # pip install netifaces pyyaml
and get the error message:

ImportError: /opt/rh/python27/root/usr/lib64/python2.7/lib-dynload/_io.so: undefined symbol: _PyErr_ReplaceException

 

Is there something that I have missed that influences the pyhon yaml module? I have also noticed that the libvert for this brand new install is version 2.0.0 and not 1.2.19 as per the installation instructions.

 

Also if I ignore the "error" the vmx and try to start the instance, it runs through up to the following error:

 System Setup Completed
==================================================
Get Management Address of enp5s0f0................[OK]
Generate libvirt files............................[Failed]
Traceback (most recent call last):
  File "/home/vmx/scripts/common/vmx_configure.py", line 3, in <module>
    import yaml
ImportError: No module named yaml
Log file........................................../dev/null
==================================================
 Aborted!. 1 error(s) and 0 warning(s)

 

If I check for yaml? I get the following:

 # pip search yaml
Traceback (most recent call last):
  File "/opt/rh/python27/root/usr/bin/pip", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/opt/rh/python27/root/usr/lib/python2.7/site-packages/pkg_resources.py", line 16, in <module>
    import sys, os, time, re, imp, types, zipfile, zipimport
  File "/opt/rh/python27/root/usr/lib64/python2.7/zipfile.py", line 6, in <module>
    import io
  File "/opt/rh/python27/root/usr/lib64/python2.7/io.py", line 51, in <module>
    import _io
ImportError: /opt/rh/python27/root/usr/lib64/python2.7/lib-dynload/_io.so: undefined symbol: _PyErr_ReplaceException

 

I assumed the module was installed with: # yum install python27-python-pip

 

Any suggestions?

 

7 REPLIES 7
vMX

Re: vMX on CentOS - pyyaml problem

‎06-30-2017 03:47 AM

More testing:

I took out the PATH statement in /etc/profiles and rebooted

Now the pip install starts to work, yet with errors... see below

 

]# pip install netifaces pyyaml
Collecting netifaces
Using cached netifaces-0.10.6.tar.gz
Requirement already satisfied: pyyaml in /usr/lib64/python2.7/site-packages
Installing collected packages: netifaces
Running setup.py install for netifaces ... error

Returning to vmx installer ./vmx.sh -lv --install, i now get the following error

 

System Setup Completed
==================================================
Get Management Address of enp5s0f0................[OK]
Generate libvirt files............................[Failed]
Traceback (most recent call last):
  File "/home/vmx/scripts/common/vmx_configure.py", line 9, in <module>
    import netifaces as ni
ImportError: No module named netifaces

 

I am not sure, yet to me it looks like a PATH issue...I assume the module netifaces does not pickup any interfaces to configure.

The other thing bugging me is in the UBUNTU install, there is a step to remove the virbr0 inteface, yet with Centos install there is no such step, although a virbr0 have been created after the 'virtualization packages"

 

Any ideas Linux guru's ?

vMX

Re: vMX on CentOS - pyyaml problem

‎06-25-2018 11:21 AM

Hi,

 

Am having the exact same issue:

 

# pip install netifaces pyyaml
Traceback (most recent call last):
  File "/opt/rh/python27/root/usr/bin/pip", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/opt/rh/python27/root/usr/lib/python2.7/site-packages/pkg_resources.py", line 16, in <module>
    import sys, os, time, re, imp, types, zipfile, zipimport
  File "/opt/rh/python27/root/usr/lib64/python2.7/zipfile.py", line 6, in <module>
    import io
  File "/opt/rh/python27/root/usr/lib64/python2.7/io.py", line 51, in <module>
    import _io
ImportError: /opt/rh/python27/root/usr/lib64/python2.7/lib-dynload/_io.so: undefined symbol: _PyErr_ReplaceException

 

Do you mind sharing how you manged to solve it ?

vMX

Re: vMX on CentOS - pyyaml problem

‎06-25-2018 11:31 AM

Found it Smiley Happy

 

# yum install python27-python-pip
# scl enable python27 bash
# source scl_source enable python27

 # vi /etc/profile.d/enablepython27.sh
#!/bin/bash
source scl_source enable python27

# export LD_LIBRARY_PATH=/opt/rh/python27/root/usr/lib64
# pip install --upgrade pip
# pip install netifaces pyyaml
vMX

Re: vMX on CentOS - pyyaml problem

[ Edited ]
‎06-25-2018 11:13 PM

Hi,

 

We can try 

yum install PyYAML

yum install python-netifaces

 

-
VR
# Please mark my solution as accepted if it helped, Kudos are appreciated as well.
Highlighted
vMX

Re: vMX on CentOS - pyyaml problem

‎06-30-2018 11:26 AM

Hi Folks, Some pointers on “How to install the library netifaces” https://stackoverflow.com/questions/24797412/how-to-install-the-library-netifaces-for-python3-in-ubu...

-Python JNCIE 3X [SP|DC|ENT] JNCIP-SEC JNCDS 3X [ WAN | DC|SEC] JNCIS-Cloud JNCIS-DevOps CCIP ITIL
#Please mark my solution as accepted if it helped, Kudos are appreciated as well.
vMX

Re: vMX on CentOS - pyyaml problem

‎07-18-2018 04:03 AM

I know you've sorted this particular issue, but from experience I'd caution against proceeding with CentOS as the base OS.  It seems to undergo little to no testing from the multitude of bugs we've found when running on CentOS - some of them in the installer scripts, the instructions given to install, the i40e driver, and operational bugs that should have been picked up in basic testing on CentOS e.g. 17.4 breaks if you have more than 1 CPU core for the VCP!

vMX

Re: vMX on CentOS - pyyaml problem

‎08-19-2019 03:01 AM

yum install -y epel-release

yum -y install python-pip

pip install netifaces pyyaml