Mac 安装MySQL-Python报错,如何解决?


Collecting MySQL-python
  Using cached MySQL-python-1.2.5.zip (108 kB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'error'

  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [8 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/private/var/folders/dn/w45dbz5d1jgb1r71xfqz744r0000gn/T/pip-install-81evuevt/mysql-python_8dfb70a3c7fd4e22ad3de2b8cbf536bf/setup.py", line 13, in <module>
          from setup_posix import get_config
        File "/private/var/folders/dn/w45dbz5d1jgb1r71xfqz744r0000gn/T/pip-install-81evuevt/mysql-python_8dfb70a3c7fd4e22ad3de2b8cbf536bf/setup_posix.py", line 2, in <module>
          from ConfigParser import SafeConfigParser
      ModuleNotFoundError: No module named 'ConfigParser'
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

这个是怎么解决?

https://0d75ce6c.wiz06.com/wapp/pages/view/share/s/0dtsVI31o44S2UuvwQ1NbmcL0aVjRf04X4Ze2IwQCu3BXv7e
这个你看下。我用的也是mac

先安装ConfigParser包