Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
4.8k views
in Technique[技术] by (71.8m points)

python - Issue with installing Flask-Mysqldb @ centos8

I am not able to install flask-mysqldb. Can someone help with this please

[lolf@localhost ~]$ pip3.9 install flask-mysqldb
Defaulting to user installation because normal site-packages is not writeable
    ERROR: Command errored out with exit status 1:
     command: /usr/local/bin/python3.9 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-25z0777f/mysqlclient_0266c5dbb5e3446ab7530b914054b117/setup.py'"'"'; __file__='"'"'/tmp/pip-install-25z0777f/mysqlclient_0266c5dbb5e3446ab7530b914054b117/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'
'"'"', '"'"'
'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-0zcjloy3
         cwd: /tmp/pip-install-25z0777f/mysqlclient_0266c5dbb5e3446ab7530b914054b117/
    Complete output (15 lines):
    /bin/sh: mysql_config: command not found
    /bin/sh: mariadb_config: command not found
    /bin/sh: mysql_config: command not found
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-25z0777f/mysqlclient_0266c5dbb5e3446ab7530b914054b117/setup.py", line 15, in <module>
        metadata, options = get_config()
      File "/tmp/pip-install-25z0777f/mysqlclient_0266c5dbb5e3446ab7530b914054b117/setup_posix.py", line 70, in get_config
        libs = mysql_config("libs")
      File "/tmp/pip-install-25z0777f/mysqlclient_0266c5dbb5e3446ab7530b914054b117/setup_posix.py", line 31, in mysql_config
        raise OSError("{} not found".format(_mysql_config_path))
    OSError: mysql_config not found
    mysql_config --version
    mariadb_config --version
    mysql_config --libs
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神解答

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...