[libvirt-users] Installing the python libvirt bindings in a virtualenv

Hi, I have a virtualenv which I am using for production (I need python 2.7 and certain libraries which can not be easily installed on the host environment). Now I am trying to install also libvirt, but I have not succeeded yet. The problem that I have now looks quite difficult to solve. This is the script I am using to install libvirt (bash script): install_libvirt_ ( ) { local myvirtualenv="$1" local libvirt_tag=v0.9.9 cd $TMP_DIR git clone git://libvirt.org/libvirt.git cd libvirt git checkout $libvirt_tag mkdir -p $VIRTUALENVS_DIR/$myvirtualenv/usr sudo apt-get install autopoint # configure: error: You must install the GnuTLS library in order to compile and run libvirt sudo apt-get install -y gnutls-bin gnutls-dev # configure: error: You must install device-mapper-devel/libdevmapper >= 1.0.0 to compile libvirt sudo apt-get install -y libdevmapper-dev libdevmapper # configure: error: You must install python-devel to build Python bindings sudo apt-get install -y python-all-dev ./autogen.sh --prefix=$VIRTUALENVS_DIR/$myvirtualenv/usr --enable-compile-warnings=error make make install } But this is failing with error message: checking for python script directory... ${prefix}/lib/python2.7/site-packages checking for python extension module directory... ${exec_prefix}/lib/python2.7/site-packages configure: error: You must install python-devel to build Python bindings python-devel does not exist. I have used python-all-dev, but it has not solved the problem. Has somebody succeeded in installing libvirt-python inside a virtualenv? Thanks, Daniel Gonzalez

On Mon, Apr 23, 2012 at 11:56:56PM +0200, Daniel Gonzalez wrote:
But this is failing with error message:
checking for python script directory... ${prefix}/lib/python2.7/site-packages checking for python extension module directory... ${exec_prefix}/lib/python2.7/site-packages configure: error: You must install python-devel to build Python bindings
python-devel does not exist. I have used python-all-dev, but it has not solved the problem.
In Debian and derivates, I believe the package you want to install is called python2.7-dev. Also, I would use the latest libvirt release (0.9.11) instead of 0.9.9.

Well, my host system has python 2.6, so python2.7.dev can not be installed. Only my virtualenv has python2.7 (compiled from source), and I have no idea how to install debian packages to my virtualenv. On Tue, Apr 24, 2012 at 7:35 AM, Henrik Ahlgren <pablo@seestieto.com> wrote:
On Mon, Apr 23, 2012 at 11:56:56PM +0200, Daniel Gonzalez wrote:
But this is failing with error message:
checking for python script directory... ${prefix}/lib/python2.7/site-packages checking for python extension module directory... ${exec_prefix}/lib/python2.7/site-packages configure: error: You must install python-devel to build Python bindings
python-devel does not exist. I have used python-all-dev, but it has not solved the problem.
In Debian and derivates, I believe the package you want to install is called python2.7-dev. Also, I would use the latest libvirt release (0.9.11) instead of 0.9.9.
participants (2)
-
Daniel Gonzalez
-
Henrik Ahlgren