Centos中pip install mysqlclient失败

这篇具有很好参考价值的文章主要介绍了Centos中pip install mysqlclient失败。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

pip install mysqlclient 错误详情如下
`
pip install mysqlclient
Looking in indexes: http://mirrors.tencentyun.com/pypi/simple
Collecting mysqlclient
Using cached http://mirrors.tencentyun.com/pypi/packages/de/9c/b176826e8994551ce826404dab97e305a4bb76c8b0a4e016fabda2901c71/mysqlclient-2.2.0.tar.gz (89 kB)
Installing build dependencies … done
Getting requirements to build wheel … error
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [22 lines of output]
Trying pkg-config --exists mysqlclient
Command ‘pkg-config --exists mysqlclient’ returned non-zero exit status 1.
Trying pkg-config --exists mariadb
Command ‘pkg-config --exists mariadb’ returned non-zero exit status 1.
Traceback (most recent call last):
File “/home/soft/pojun/env/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py”, line 353, in
main()
File “/home/soft/pojun/env/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py”, line 335, in main
json_out[‘return_val’] = hook(**hook_input[‘kwargs’])
File “/home/soft/pojun/env/lib/python3.10/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-favaar6d/overlay/lib/python3.10/site-packages/setuptools/build_meta.py”, line 341, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=[‘wheel’])
File “/tmp/pip-build-env-favaar6d/overlay/lib/python3.10/site-packages/setuptools/build_meta.py”, line 323, in _get_build_requires
self.run_setup()
File “/tmp/pip-build-env-favaar6d/overlay/lib/python3.10/site-packages/setuptools/build_meta.py”, line 338, in run_setup
exec(code, locals())
File “”, line 154, in
File “”, line 48, in get_config_posix
File “”, line 27, in find_package_name
Exception: Can not find valid pkg-config name.
Specify MYSQLCLIENT_CFLAGS and MYSQLCLIENT_LDFLAGS env vars manually
[end of output]

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.

`

由于python版本是3.10的。看了一下网上说配置环境变量啥的,感觉不靠谱,就去github看了一下。
执行一下下面命令,安装devel

yum install python3-devel mysql-devel pkgconfig

然后就没问题了。记录一下,希望能帮助到遇到类似问题的同学。文章来源地址https://www.toymoban.com/news/detail-632444.html

到了这里,关于Centos中pip install mysqlclient失败的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • windows环境 pip安装mysqlclient失败问题记录及解决方案

    直接下载安装mysqlclient whl文件进行安装 https://www.lfd.uci.edu/~gohlke/pythonlibs/#mysqlclient 注意:cp37即表示python3.7的版本,其他版本号同理,win32表示windows 32位的, win_amd64表示windows 64位 我这里是python3.7的版本,系统是64位所以选择 mysqlclient‑1.4.6‑cp37‑cp37m‑win_amd64.whl 结果如下:

    2024年02月11日
    浏览(28)
  • Linux centOS yum install MySQL5.7

    下载并安装 MySQL YUM 仓库 这将为您的 CentOS 系统安装 MySQL YUM 仓库。 wget https://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm 这个命令主要用于从 MySQL 的官方网站下载 MySQL YUM 仓库的 RPM 包。 在这个命令中: 1.wget 是一个自由的网络下载工具,常用于在终端环境中下载网络文件

    2024年02月07日
    浏览(37)
  • pip install paddlex 失败详解

    小编最近整理了一下安装paddlex时会遇到的错误,希望能帮助到小伙伴们~ 一、问题一:  error: Microsoft Visual C++ 14.0 or greater is required. Get it with \\\"Microsoft C++ Build Tools\\\"  此问题所在是需要Microsoft Visual C++14.0 解决办法: 安装《Microsoft C++构建工具》 Microsoft C++ 生成工具

    2024年02月07日
    浏览(21)
  • Centos yum install出现Error: Unable to find a match: epel-release的解决方案

      大家好,我是爱编程的喵喵。双985硕士毕业,现担任全栈工程师一职,热衷于将数据思维应用到工作与生活中。从事机器学习以及相关的前后端开发工作。曾在阿里云、科大讯飞、CCF等比赛获得多次Top名次。现为CSDN博客专家、人工智能领域优质创作者。喜欢通过博客创作

    2024年02月12日
    浏览(25)
  • pip3 install paramiko 安装失败

    running build_ext generating cffi module ‘build/temp.linux-x86_64-cpython-37/cryptography.hazmat.bindings._openssl.c’ creating build/temp.linux-x86_64-cpython-37 running build_rust error: can’t find Rust compiler If you are using an outdated pip version, it is possible a prebuilt wheel is available for this package but pip is not able to install from i

    2024年02月05日
    浏览(45)
  • 【selenium】pip install selenuim失败问题解决

            windows系统安装PyCharm和python (3.12版本) ,配置python环境变量。         PyCharm引入chromedriver,PyCharm使用pip install selenium下载selenium。         度娘上看了各种类似报错的处理方法,跟着折腾了一遍,花了一整天都没搞定,郁闷了。         第二天继续处理,看

    2024年02月09日
    浏览(28)
  • linux centos7 口令复杂度、登陆失败策略

    整改内容: linux centos7配置口令复杂度和有效期策略 在服务器中配置口令复杂度策略:如密码由至少1位大小写字母、数字、特殊字符组成,口令有效期为90天。 在服务器中配置登录失败5次锁定账户3分钟,超时退出15分钟。 编辑PAM配置文件/etc/pam.d/system-auth,加入以下行: 解

    2024年02月05日
    浏览(33)
  • 【问题记录】pip install -r requirements.txt 安装失败

    一般在使用 pip 安装 python 相关的包的时候,可能会由于网络问题失败 可以采用国内镜像进行下载安装,复制下面代码重新进行下载安装: 安装成功:

    2024年02月15日
    浏览(34)
  • Python + selenium 安装问题,pip install selenium失败及解决方法

              最近想要是使用Python 访问下浏览器,网上关于这些东西都很多,Python 安装和 selenium 的下载就不赘述,这里简单总结一下第一次安装Python + selenium中遇到的问题。     Python傻瓜式安装,但注意 安装目录选择 , 环境变量的添加 。     selenium.exe下载对应浏览器对应

    2024年02月11日
    浏览(43)
  • dokcer给Centos配置时出现ERROR: failed to solve: process “/bin/sh -c yum -y install vim“ did not complete s

    是因为Docker默认拉取的是centos最新版,此时需要我们指定一下拉取的版本就比如: 然后在我们的Dockerfile文件中编写

    2024年02月11日
    浏览(67)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包