On Thu, Jan 25, 2018 at 03:09:47PM +0000, abinaya.manikandan(a)wipro.com wrote:
Hi,
As per you suggestion I have set PYTHONPATH.
Now the issue is different.
[root@euca-172-31-15-221 ~]$ echo $PYTHONPATH
/opt/libguestfs/x86_64/1.32.10/lib64:/opt/libguestfs/x86_64/1.32.10/lib/python3.6/site-packages/:
[root@euca-172-31-15-221 ~]$ python
Python 3.6.0 (default, Jun 1 2017, 02:10:02)
[GCC 4.4.4 20100726 (Red Hat 4.4.4-13)] on linux
Type "help", "copyright", "credits" or "license"
for more information.
>>> import sys
>>> print(sys.path)
['', '/opt/libguestfs/x86_64/1.32.10/lib64',
'/opt/libguestfs/x86_64/1.32.10/lib/python3.6/site-packages', '/root',
'/opt/python/x86_64/3.6.0-1/lib/python36.zip',
'/opt/python/x86_64/3.6.0-1/lib/python3.6',
'/opt/python/x86_64/3.6.0-1/lib/python3.6/lib-dynload',
'/opt/python/x86_64/3.6.0-1/lib/python3.6/site-packages']
>>> import guestfs
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/libguestfs/x86_64/1.32.10/lib/python3.6/site-packages/guestfs.py",
line 73, in <module>
import libguestfsmod
ModuleNotFoundError: No module named 'libguestfsmod'
I guess you need to find where libguestfsmod* was installed
and add that to the PYTHONPATH as well.
In my python3 install both libraries are in the same directory,
I don't know why it's different for you.
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine. Supports Linux and Windows.
http://people.redhat.com/~rjones/virt-df/