简体   繁体   中英

Install ovritsdk inside a virtualenv

right now i am trying to develop some ovirt application. The development happens inside some virtualenv, where i am trying to install the ovirt-engine-sdk-python package over pip. But everytime i try to install the package pip installer claims it can't find libxml/xmlversion.h . The headerfiles are installed on my System and i also can find them. So my question is, does the pip install fails inside the virtualenv because of pip cant find the headerfiles inside that virtualenv. This is the error output:

In file included from src/lxml/lxml.etree.c:346:0:

/home/dirk/Dokumente/devel/python/bla2-0/devEnv/build/lxml/src/lxml/includes/etree_defs.h:9:31: fatal error: libxml/xmlversion.h: Datei oder Verzeichnis nicht gefunden

 #include "libxml/xmlversion.h"

                               ^

compilation terminated.

error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

Thanks for your help in advance.

Kind regards,

Dirk

Okay looks like i solved the problem.

sudo apt-get install libxml2-dev
sudo apt-get install lib32z1-dev

and then inside the virutalenv:

pip install lxml
pip install ovirt-engine-sdk-python


python
Python 2.7.5+ (default, Feb 27 2014, 19:37:08) 
[GCC 4.8.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import ovirtsdk
>>> from ovirtsdk.api import API
>>> 

worked for me :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM