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

Posted fqxy

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了克隆kvm虚拟机报错ImportError: No module named 'requests.packages.urllib3'相关的知识,希望对你有一定的参考价值。


2018-06-21


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

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

报错信息

Traceback (most recent call last):
  File "/usr/share/virt-manager/virt-clone", line 27, in <module>
    import virtinst.cli as cli
  File "/usr/share/virt-manager/virtinst/__init__.py", line 89, in <module>
    from virtinst.distroinstaller import DistroInstaller
  File "/usr/share/virt-manager/virtinst/distroinstaller.py", line 23, in <module>
    from . import urlfetcher
  File "/usr/share/virt-manager/virtinst/urlfetcher.py", line 34, in <module>
    import requests
  File "/usr/lib/python2.7/site-packages/requests/__init__.py", line 58, in <module>
    from . import utils
  File "/usr/lib/python2.7/site-packages/requests/utils.py", line 32, in <module>
    from .exceptions import InvalidURL
  File "/usr/lib/python2.7/site-packages/requests/exceptions.py", line 10, in <module>
    from .packages.urllib3.exceptions import HTTPError as BaseHTTPError
  File "/usr/lib/python2.7/site-packages/requests/packages/__init__.py", line 95, in load_module
    raise ImportError("No module named ‘%s‘" % (name,))
ImportError: No module named requests.packages.urllib3

解决方案

pip install docker-compose --ignore-installed requests

亲测有效

以上是关于克隆kvm虚拟机报错ImportError: No module named 'requests.packages.urllib3'的主要内容,如果未能解决你的问题,请参考以下文章

VCenter克隆虚拟机报错msg.snapshot.error-QUIESCINGERROR

KVM使用QCOW2创建虚拟机报不支持错误

KVM虚拟机安装

安装虚拟机报错!怎么解决!

VMware虚拟机报错:无法打开内核设备

虚拟机报错整理