How to fix ImportError: No module named packages.urllib3?

后端 未结 5 1700
既然无缘
既然无缘 2020-12-11 01:09

I\'m running Python 2.7.6 on an Ubuntu machine. When I run twill-sh (Twill is a browser used for testing websites) in my Terminal, I\'m getting the following:

5条回答
  •  暖寄归人
    2020-12-11 01:51

    python3

    #note that requests.packages.urllib3 is just an alias for urllib3
    from urllib3 import disable_warnings
    from urllib3.exceptions import InsecureRequestWarning
    disable_warnings(InsecureRequestWarning)
    

提交回复
热议问题