简体   繁体   中英

ImportError: No module named ovirtsdk.api

I am trying to run a program backup.py from this github The link is added below.

https://github.com/wefixit-AT/oVirtBackup/blob/master/backup.py

For that first i made a b.py containg the python as only this much

#!/usr/bin/python
import logging
from argparse import ArgumentParser, FileType
import ovirtsdk.api
from ovirtsdk.xml import params
from ovirtsdk.infrastructure import errors
import sys
import time
from vmtools import VMTools
from config import Config

When i ran python b.py i got error as ..

 python b.py
Traceback (most recent call last):
  File "b.py", line 4, in <module>
    import ovirtsdk.api
ImportError: No module named ovirtsdk.api

My python version is python 2.7. How can i get rid of this error what package should i install. I am using ubuntu 18.04

yum 安装 ovirt-engine-sdk-python

Below command helps resolve the issue:

$ pip install ovirt-engine-sdk-python==3.6.9.2

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