ly131936964 发表于 2024-2-1 11:12:52

【待反馈】python项目 mysql 依赖一直安装失败

Collecting mysqlclient==2.* (from -r requirements.txt (line 2))
Using cached mysqlclient-2.2.1.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

错误也很明显 一直到这里就不行根据网上的操作yum install python3-devel mysql-devel pkgconfig   安装的是python2.7的但是我虚拟环境用的3.10的   最主要 我现在没办法source 到虚拟环境中


大炮运维V587 发表于 2024-2-1 11:49:12

您好,您的虚拟环境的pip路径发下

ly131936964 发表于 2024-2-1 11:50:34

大炮运维V587 发表于 2024-2-1 11:49
您好,您的虚拟环境的pip路径发下

/www/server/pyporject_evn/Archery-master_venv/bin   你要的是这路径吗?

ly131936964 发表于 2024-2-1 11:51:42

大炮运维V587 发表于 2024-2-1 11:49
您好,您的虚拟环境的pip路径发下

/www/server/pyporject_evn/Archery-master_venv/bin/pip3 install -r requirements.txt

ly131936964 发表于 2024-2-1 11:53:17

大炮运维V587 发表于 2024-2-1 11:49
您好,您的虚拟环境的pip路径发下

你们就放到txt 文本里面   mysqlclient==2.*   然后安装一下依赖我用的是django框架手动安装依赖   这个问题一直都没解决昨天到现在

ly131936964 发表于 2024-2-1 13:37:23

大炮运维V587 发表于 2024-2-1 11:49
您好,您的虚拟环境的pip路径发下

      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.
      Trying pkg-config --exists libmariadb
      Command 'pkg-config --exists libmariadb' returned non-zero exit status 1.
      Traceback (most recent call last):

你好 这是安装的时候提示的错误

ly131936964 发表于 2024-2-1 13:57:37

请问下 如何在python 虚拟环境中 yum 我现在想在虚拟环境中 yum install python3.10 mysql-devel   但是都是安装到线上Command 'pkg-config --exists mariadb' returned non-zero exit status 1.
      Trying pkg-config --exists libmariadb   这个mariadb已经安装 还是一直提示我
页: [1]
查看完整版本: 【待反馈】python项目 mysql 依赖一直安装失败