pip3 install MySQL-python

Collecting mysqlclient
  Downloading http://mirrors.cloud.aliyuncs.com/pypi/packages/f4/f1/3bb6f64ca7a429729413e6556b7ba5976df06019a5245a43d36032f1061e/mysqlclient-1.4.2.post1.tar.gz (85kB)
    100% |████████████████████████████████| 92kB 13.4MB/s 
    Complete output from command python setup.py egg_info:
    /bin/sh: 1: mysql_config: not found
    Traceback (most recent call last):
      File "", line 1, in 
      File "/tmp/pip-build-g9pwoj_v/mysqlclient/setup.py", line 16, in 
        metadata, options = get_config()
      File "/tmp/pip-build-g9pwoj_v/mysqlclient/setup_posix.py", line 51, in get_config
        libs = mysql_config("libs")
      File "/tmp/pip-build-g9pwoj_v/mysqlclient/setup_posix.py", line 29, in mysql_config
        raise EnvironmentError("%s not found" % (_mysql_config_path,))
    OSError: mysql_config not found
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-g9pwoj_v/mysqlclient/

https://blog.csdn.net/wangtaoking1/article/details/51554959


Collecting MySQL-python
  Downloading http://mirrors.cloud.aliyuncs.com/pypi/packages/a5/e9/51b544da85a36a68debe7a7091f068d802fc515a3a202652828c73453cad/MySQL-python-1.2.5.zip (108kB)
    100% |████████████████████████████████| 112kB 18.8MB/s 
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "", line 1, in 
      File "/tmp/pip-build-c6ou4hq7/MySQL-python/setup.py", line 13, in 
        from setup_posix import get_config
      File "/tmp/pip-build-c6ou4hq7/MySQL-python/setup_posix.py", line 2, in 
        from ConfigParser import SafeConfigParser
    ModuleNotFoundError: No module named 'ConfigParser'
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-c6ou4hq7/MySQL-python/

ubuntu python3 不支持mysqlclient 推荐使用pymysql,解决问题,什么玩意?????

你可能感兴趣的:(linux,ubuntu,mysql)