Could not install flask-mysqldb and mysql client
I am getting this error every time i try to install mysql client. Please help me i have tried every thing that i could find on web.
pip install mysqlclient (venv) (base) arunaacharya@192-168-1-102 Ecommerce-Website-Using-Python-Flask % pip install mysqlclient Collecting mysqlclient Using cached mysqlclient-2.1.1.tar.gz (88 kB) Preparing metadata (setup.py) ... error error: subprocess-exited-with-error × python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [16 lines of output] /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 "", line 2, in File "", line 34, in File "/private/var/folders/cg/bbbhpq4x1llfdvp834xw_q480000gn/T/pip-install-t15u39pt/mysqlclient_1f379ebac8d642cfaaedf1cabc394fcb/setup.py", line 15, in metadata, options = get_config() File "/private/var/folders/cg/bbbhpq4x1llfdvp834xw_q480000gn/T/pip-install-t15u39pt/mysqlclient_1f379ebac8d642cfaaedf1cabc394fcb/setup_posix.py", line 70, in get_config libs = mysql_config("libs") File "/private/var/folders/cg/bbbhpq4x1llfdvp834xw_q480000gn/T/pip-install-t15u39pt/mysqlclient_1f379ebac8d642cfaaedf1cabc394fcb/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 [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. (venv) (base) arunaacharya@192-168-1-102 Ecommerce-Website-Using-Python-Flask % pip install Flask-MySQLdb Collecting Flask-MySQLdb Downloading Flask-MySQLdb-1.0.1.tar.gz (4.3 kB) Preparing metadata (setup.py) ... done Requirement already satisfied: Flask>=0.12.4 in /Users/arunaacharya/Downloads/quizzler-app-start (1)/venv/lib/python3.10/site-packages (from Flask-MySQLdb) (1.0.2) Collecting mysqlclient>=1.3.7 Using cached mysqlclient-2.1.1.tar.gz (88 kB) Preparing metadata (setup.py) ... error error: subprocess-exited-with-error × python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [16 lines of output] /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 "", line 2, in File "", line 34, in File "/private/var/folders/cg/bbbhpq4x1llfdvp834xw_q480000gn/T/pip-install-698ottdz/mysqlclient_9f473db310e64207bbd2cd53caae517d/setup.py", line 15, in metadata, options = get_config() File "/private/var/folders/cg/bbbhpq4x1llfdvp834xw_q480000gn/T/pip-install-698ottdz/mysqlclient_9f473db310e64207bbd2cd53caae517开发者_如何学运维d/setup_posix.py", line 70, in get_config libs = mysql_config("libs") File "/private/var/folders/cg/bbbhpq4x1llfdvp834xw_q480000gn/T/pip-install-698ottdz/mysqlclient_9f473db310e64207bbd2cd53caae517d/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 [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. (venv) (base) arunaacharya@192-168-1-102 Ecommerce-Website-Using-Python-Flask % Flask % (venv) (base) arunaacharya@192-168-1-102 Ecommerce-Website-Using-Python-Flask % pip install Flask-MySQLdb Collecting Flask-MySQLdb Using cached Flask-MySQLdb-1.0.1.tar.gz (4.3 kB) Preparing metadata (setup.py) ... done Requirement already satisfied: Flask>=0.12.4 in /Users/arunaacharya/Downloads/quizzler-app-start (1)/venv/lib/python3.10/site-packages (from Flask-MySQLdb) (1.0.2) Collecting mysqlclient>=1.3.7 Using cached mysqlclient-2.1.1.tar.gz (88 kB) Preparing metadata (setup.py) ... error error: subprocess-exited-with-error × python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [16 lines of output] /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 "", line 2, in File "", line 34, in File "/private/var/folders/cg/bbbhpq4x1llfdvp834xw_q480000gn/T/pip-install-jg3d3p6i/mysqlclient_7557ef5a1ca4412b96f132e911f0ab78/setup.py", line 15, in metadata, options = get_config() File "/private/var/folders/cg/bbbhpq4x1llfdvp834xw_q480000gn/T/pip-install-jg3d3p6i/mysqlclient_7557ef5a1ca4412b96f132e911f0ab78/setup_posix.py", line 70, in get_config libs = mysql_config("libs") File "/private/var/folders/cg/bbbhpq4x1llfdvp834xw_q480000gn/T/pip-install-jg3d3p6i/mysqlclient_7557ef5a1ca4412b96f132e911f0ab78/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 [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. (venv) (base) arunaacharya@192-168-1-102 Ecommerce-Website-Using-Python-Flask % pip install mysqlclient Collecting mysqlclient Using cached mysqlclient-2.1.1.tar.gz (88 kB) Preparing metadata (setup.py) ... error error: subprocess-exited-with-error × python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [16 lines of output] /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 "", line 2, in File "", line 34, in File "/private/var/folders/cg/bbbhpq4x1llfdvp834xw_q480000gn/T/pip-install-5ebksb7q/mysqlclient_e632ba95c6a94475a5d7384e6d1b34ea/setup.py", line 15, in metadata, options = get_config() File "/private/var/folders/cg/bbbhpq4x1llfdvp834xw_q480000gn/T/pip-install-5ebksb7q/mysqlclient_e632ba95c6a94475a5d7384e6d1b34ea/setup_posix.py", line 70, in get_config libs = mysql_config("libs") File "/private/var/folders/cg/bbbhpq4x1llfdvp834xw_q480000gn/T/pip-install-5ebksb7q/mysqlclient_e632ba95c6a94475a5d7384e6d1b34ea/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 [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. (venv) (base) arunaacharya@192-168-1-102 Ecommerce-Website-Using-Python- Flask % echo 'export PATH="/usr/local/opt/mysql-client/bin:$PATH"' >> ~/.zshrc (venv) (base) arunaacharya@192-168-1-102 Ecommerce-Website-Using-Python-Flask % echo $PATH /Users/arunaacharya/Downloads/quizzler-app-start (1)/venv/bin:/Users/arunaacharya/opt/anaconda3/bin:/Users/arunaacharya/opt/anaconda3/condabin:/Library/Frameworks/Python.framework/Versions/3.10/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/arunaacharya/Library/Android/sdk/jdk:/usr/local/share/dotnet:~/.dotnet/tools:/Library/Apple/usr/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Users/arunaacharya/tools/flutter/bin (venv) (base) arunaacharya@192-168-1-102 Ecommerce-Website-Using-Python-Flask % pip install mysqlclient Collecting mysqlclient Using cached mysqlclient-2.1.1.tar.gz (88 kB) Preparing metadata (setup.py) ... error error: subprocess-exited-with-error × python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [16 lines of output] /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 "", line 2, in File "", line 34, in File "/private/var/folders/cg/bbbhpq4x1llfdvp834xw_q480000gn/T/pip-install-0_s21dd9/mysqlclient_6fab8f1d72ad46c9a2429b9381d4f65e/setup.py", line 15, in metadata, options = get_config() File "/private/var/folders/cg/bbbhpq4x1llfdvp834xw_q480000gn/T/pip-install-0_s21dd9/mysqlclient_6fab8f1d72ad46c9a2429b9381d4f65e/setup_posix.py", line 70, in get_config libs = mysql_config("libs") File "/private/var/folders/cg/bbbhpq4x1llfdvp834xw_q480000gn/T/pip-install-0_s21dd9/mysqlclient_6fab8f1d72ad46c9a2429b9381d4f65e/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 [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.
精彩评论