Hi, I have enable python in libguestfs but I could see below log while running: ***************************************************************** Thank you for downloading libguestfs 1.32.10 This is how we have configured the optional components for you today: Daemon .............................. no Appliance ........................... no QEMU ................................ /opt/qemu/x86_64/2.4.0/bin-wrapped/qemu-kvm guestfish and C-based virt tools .... yes FUSE filesystem ..................... no GNU gettext for i18n ................ yes virt-p2v ............................ no OCaml bindings ...................... yes OCaml-based virt tools .............. yes Perl bindings ....................... no Perl-based virt tools ............... no Python bindings ..................... no Ruby bindings ....................... no Java bindings ....................... yes Haskell bindings .................... no PHP bindings ........................ no Erlang bindings ..................... no Lua bindings ........................ no Go bindings ......................... no gobject bindings .................... yes gobject introspection ............... no bash completion ..................... no *************************************************************** If any optional component is configured 'no' when you expected 'yes' then you should check the preceding messages. But also I could see below line in same log: ***************************************************************** checking for python... python checking Python version... 3.6 ***************************************************************** Please let me know where I made mistake. Regards, Abinaya -----Original Message----- From: Richard W.M. Jones [mailto:rjones@redhat.com] Sent: Thursday, January 25, 2018 8:49 PM To: Abinaya Sandhiya Manikandan (GIS) <abinaya.manikandan@wipro.com> Cc: libguestfs@redhat.com Subject: Re: [Libguestfs] python 3 bindings on libguestfs ** This mail has been sent from an external source ** On Thu, Jan 25, 2018 at 03:09:47PM +0000, abinaya.manikandan@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 https://clicktime.symantec.com/a/1/KNFGbgmwVslqCkAItD5KzPPZ9eRGt_fx1HIIyC_kZ5c=?d=GmULzK_tXQNfjzfdeMRSiuzfFNVJAbDLwAxgzjynSIIQsH_ZqPWjZlbOG37FZSGWtNl6EhzHXzggG8z5yrqW425xSIcfWPuDn5y6cZriSTZ97Vl6LHPSHqSk7E1mkQfCrhEoKDwM736LwkElu3YX8qMpbkRCbkDtQM8qlRfARP0WPuRWIAr1L61Xtj5fWpvsVgm7Z-VaOBlegwWZgpaccFkv8kwTLD2I10OsIKd3AK5B93w9CT21ejv73_e086kyUN0CQkXrm9v9SPE6O7wmmXe9LqxqUD3A_RWpv52xpe-ZK2O0oKYfJzccsXG7jJgBdUo7lX_CpP_voWtAEqpsnOkUZRzl1DXNtLZIyk3yGet1YohZBeLhze4%3D&u=http%3A%2F%2Fpeople.redhat.com%2F~rjones Read my programming and virtualization blog: https://clicktime.symantec.com/a/1/hVAighY8J909ZMoGmGkWfRK3PHiu1Cbk2kr68j6v9lI=?d=GmULzK_tXQNfjzfdeMRSiuzfFNVJAbDLwAxgzjynSIIQsH_ZqPWjZlbOG37FZSGWtNl6EhzHXzggG8z5yrqW425xSIcfWPuDn5y6cZriSTZ97Vl6LHPSHqSk7E1mkQfCrhEoKDwM736LwkElu3YX8qMpbkRCbkDtQM8qlRfARP0WPuRWIAr1L61Xtj5fWpvsVgm7Z-VaOBlegwWZgpaccFkv8kwTLD2I10OsIKd3AK5B93w9CT21ejv73_e086kyUN0CQkXrm9v9SPE6O7wmmXe9LqxqUD3A_RWpv52xpe-ZK2O0oKYfJzccsXG7jJgBdUo7lX_CpP_voWtAEqpsnOkUZRzl1DXNtLZIyk3yGet1YohZBeLhze4%3D&u=http%3A%2F%2Frwmj.wordpress.com virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. https://clicktime.symantec.com/a/1/jnoNHRkPC3RWm4nusnjpSp0fs8I-7B5nB62pkczrUiE=?d=GmULzK_tXQNfjzfdeMRSiuzfFNVJAbDLwAxgzjynSIIQsH_ZqPWjZlbOG37FZSGWtNl6EhzHXzggG8z5yrqW425xSIcfWPuDn5y6cZriSTZ97Vl6LHPSHqSk7E1mkQfCrhEoKDwM736LwkElu3YX8qMpbkRCbkDtQM8qlRfARP0WPuRWIAr1L61Xtj5fWpvsVgm7Z-VaOBlegwWZgpaccFkv8kwTLD2I10OsIKd3AK5B93w9CT21ejv73_e086kyUN0CQkXrm9v9SPE6O7wmmXe9LqxqUD3A_RWpv52xpe-ZK2O0oKYfJzccsXG7jJgBdUo7lX_CpP_voWtAEqpsnOkUZRzl1DXNtLZIyk3yGet1YohZBeLhze4%3D&u=http%3A%2F%2Fpeople.redhat.com%2F~rjones%2Fvirt-df%2F ______________________________________________________________________ This email has been scanned by the Symantec Email Security.cloud service. For more information please visit http://www.symanteccloud.com ______________________________________________________________________ The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. www.wipro.com ______________________________________________________________________ This email has been scanned by the Symantec Email Security.cloud service. For more information please visit http://www.symanteccloud.com ______________________________________________________________________