克隆kvm虚拟机报错ImportError: No module named 'requests.packages.urllib3'

时间:2022-11-30 11:42:18

2018-06-21


更新系统造成kvm克隆命令报错

virt-clone -o centos--update-clone  -n centos--maven-test -f /var/lib/vmdk/jingxiang/maven-test.qcow2

报错信息

Traceback (most recent call last):
  File , in <module>
    import virtinst.cli as cli
  File , in <module>
    from virtinst.distroinstaller import DistroInstaller
  File , in <module>
    from . import urlfetcher
  File , in <module>
    import requests
  File , in <module>
    from . import utils
  File , in <module>
    from .exceptions import InvalidURL
  File , in <module>
    from .packages.urllib3.exceptions import HTTPError as BaseHTTPError
  File , in load_module
    raise ImportError("No module named '%s'" % (name,))
ImportError: No module named 'requests.packages.urllib3'

解决方案

pip install docker-compose --ignore-installed requests

亲测有效