Problems encountered in self-study python_Cannot import configparser module, import configparser error solution

Under Python2, capitalization is required: import ConfigParser

Under PYthon3, lowercase is required: import configparser

 

If not for the above reasons, other solutions:

1. Add environment variables

    Add python related folders, python folder, scripts folder to environment variables.

2. Find configparse in the lib and add it to the script, so it returns to normal

 

Guess you like

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