【待反馈】mysqlclient无法在虚拟环境安装
为了能快速了解并处理您的问题,请提供以下基础信息:系统版本:centos7 python3.8.5
问题描述:无法安装mysqlclient
相关截图(日志、错误):
Last login: Tue Aug 20 18:45:51 2024 from ser955089343663.local
-bash-4.2# cd /www/wwwroot/cqcd.aqinco.com_1855/8122bf18052063455d3ec59fe8b564ef_venv/bin
-bash-4.2# ls
2to3 gunicornpip3 python3 sqlformat
2to3-3.8 idle3 pip3.8 python3.8 uvicorn
django-admin idle3.8 pydoc3 python3.8-configuwsgi
easy_install-3.8pip pydoc3.8python3-config wheel
-bash-4.2# pip3.8 install mysqlclient
-bash: pip3.8: command not found
-bash-4.2# ./pip3.8 install mysqlclient
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
-bash-4.2# main()
File "/www/wwwroot/cqcd.aqinco.com_1855/8122bf18052063455d3ec59fe8b564ef_venv/lib/python3.8/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/www/wwwroot/cqcd.aqinco.com_1855/8122bf18052063455d3ec59fe8b564ef_venv/lib/python3.8/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
File "/tmp/pip-build-env-ee45au79/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 332, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=[])
File "/tmp/pip-build-env-ee45au79/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 302, in _get_build_requires
self.run_setup()
File "/tmp/pip-build-env-ee45au79/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 318, in run_setup
exec(code, locals())
File "<string>", line 155, in <module>
File "<string>", line 49, in get_config_posix
File "<string>", line 28, in find_package_name
Exception: Can not find valid pkg-config name.
Specify MYSQLCLIENT_CFLAGS and MYSQLCLIENT_LDFLAGS env vars manually
宝塔用户_rpabyv 发表于 2024-8-20 19:13
main()
File "/www/wwwroot/cqcd.aqinco.com_1855/8122bf18052063455d3ec59fe8b564ef_ve ...
您好,暂时无法判断您说的问题,您这个应该是自己搭建的环境吧
参考链接
https://geek-docs.com/mysql/mysql-ask-answer/1287_mysql_unable_to_install_mysqlclient_in_python3_virtualenv.html
这个链接可以查看一下
页:
[1]