I recently used mysql8.0, so I tried using Django’s framework. Error: poetry add mysqlClient
(python3.7) dison @ dison - X450LD: ~ / workstation/project/script_scheduler $poetry add mysqlclient Using version ^ 2.0.3 for mysqlclient Updating dependencies Resolving dependencies... (0.1s) Package operations: 1 install, 0 updates, 0 removals • Installing mysqlClient (2.0.3): Failed EnvCommandError Command ['/home/dison/miniconda3 / envs/python3.7 / bin/PIP ', 'install', '- no - deps', 'file:///home/dison/.cache/pypoetry/artifacts/62/65/91/bcefed4d522a6f6269f2052d15faa4291b24d11c2b8722ef54c370b813/mysqlc Lient-2.0.3.tar. gz'] errored with the following return code 1, and output: Processing /home/dison/.cache/pypoetry/artifacts/62/65/91/bcefed4d522a6f6269f2052d15faa4291b24d11c2b8722ef54c370b813/mysqlclient-2. 0.3.tar.gz ERROR: Command errored out with exit status 1: Command: / home/dison/miniconda3 / envs/python3.7 / bin/python - c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-8vtznvan/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-8vtznvan/setup.py'"'"'; f=getattr(tokenize, '"'"'open'"'"', open)(__file__); code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"'); f.close(); exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-fbnd90o_ cwd: /tmp/pip-req-build-8vtznvan/ Complete output (15 lines): /bin/sh: 1: mysql_config: not found /bin/sh: 1: mariadb_config: not found /bin/sh: 1: mysql_config: not found mysql_config --version mariadb_config --version mysql_config --libs Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-req-build-8vtznvan/setup.py", line 15, in <module> metadata, options = get_config() File "/tmp/pip-req-build-8vtznvan/setup_posix.py", line 70, in get_config libs = mysql_config("libs") File "/tmp/pip-req-build-8vtznvan/setup_posix.py", line 31, in mysql_config raise OSError("{} not found".format(_mysql_config_path)) OSError: mysql_config not found ---------------------------------------- WARNING: Discarding file:///home/dison/.cache/pypoetry/artifacts/62/65/91/bcefed4d522a6f6269f2052d15faa4291b24d11c2b8722ef54c370b813/mysqlcl Ient-2.0.3.tar.gz. Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. ERROR: Command errored out with exit status 1: Python setup. Py egg_info Check the logs for full command. The output at ~ /. Poetry/lib/poetry/utils/env. Py: 1101 │ _run in 1097 Output =subprocess. check_output(1098│ CMD, stderr=subprocess.STDOUT, **kwargs 1099│ 1100│ except CalledProcessError as e: → 1101│ raise EnvCommandError(e, input=input_) 1102│ 1103│ return decode(Output) 1104│ def execute(self, bin, self) *args, **kwargs):Copy the code
A close check is that I deployed mysql through Docker without providing a mysql development environment. Sudo apt-get install libmysqlclient-dev = sudo apt-get install libmysqlclient-dev = sudo apt-get
(python3.7) dison @ dison - X450LD: ~ / workstation/project/script_scheduler $poetry add mysqlclient Using version ^ 2.0.3 for mysqlclient Updating dependencies Resolving dependencies... (0.2s) Package Operations: 1 install, 0 updates, 0 removalsCopy the code
Reference:
- Docker 1906 mysqlclientを concentrated cannibalト 漢 詩 ー becomes becomes slighter glancing
- OSError: mysql_config not found #4