About python:AttributeError: module 'xxx' has no attribute 'xxx' error solution

When running a python program, there may be such an error: AttributeError: module 'xxx' has no attribute 'xxx', such as:
write picture description here
In my study, there are two ways to solve this error

  1. Install the module manually
    write picture description here
  2. Checking the file name
    This method may seem silly, but it is a common mistake made by newbies, because the name of the file is the same as the name of the module to be used:
    write picture description here
    just change the file name.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325764325&siteId=291194637