Python 3 ImportError: No module named 'ConfigParser'

前端 未结 18 2304
半阙折子戏
半阙折子戏 2020-11-22 12:52

I am trying to pip install the MySQL-python package, but I get an ImportError.

Jans-MacBook-Pro:~ jan$ /Library/Framew         


        
18条回答
  •  渐次进展
    2020-11-22 13:21

    how about checking the version of Python you are using first.

    import six
    if six.PY2:
        import ConfigParser as configparser
    else:
        import configparser
    

提交回复
热议问题