ly131936964 发表于 2024-1-31 15:35:52

【已完成】python安装Django项目 依赖安装不成功

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


怎么安装都不行

ly131936964 发表于 2024-1-31 15:36:42

Getting requirements to build wheel ... error
error: subprocess-exited-with-error

ly131936964 发表于 2024-1-31 15:46:03

requirements.txt里面mysqlclient==2.*   一直安装失败用的是宝塔自带的安装

大炮运维V587 发表于 2024-1-31 15:46:52

您好,看提示是你的pip安装源的问题,您执行 后面加上指定豆瓣的安装源
环境变量的pipinstall mysqlclient -ihttp://pypi.douban.com/simple

ly131936964 发表于 2024-1-31 16:07:28

大炮运维V587 发表于 2024-1-31 15:46
您好,看提示是你的pip安装源的问题,您执行 后面加上指定豆瓣的安装源

好 我现在就执行

ly131936964 发表于 2024-1-31 16:08:41

大炮运维V587 发表于 2024-1-31 15:46
您好,看提示是你的pip安装源的问题,您执行 后面加上指定豆瓣的安装源

我把mysql哪个依赖去掉还有其他错误 你看下这个

ERROR: Could not build wheels for python-ldap, which is required to install pyproject.toml-based projects

大炮运维V587 发表于 2024-1-31 16:34:52

ly131936964 发表于 2024-1-31 16:08
我把mysql哪个依赖去掉还有其他错误 你看下这个

ERROR: Could not build wheels for python-ldap, w ...

您好,你的操作系统是哪个?
这个python-ldap需要单独安装
centos系列需要执行下面命令
yum install openldap-devel python-devel
debian系列
apt-get install build-essential python3-dev \
    libldap2-dev libsasl2-dev slapd ldap-utils tox \
    lcov valgrind

ly131936964 发表于 2024-1-31 17:07:56

大炮运维V587 发表于 2024-1-31 16:34
您好,你的操作系统是哪个?
这个python-ldap需要单独安装
centos系列需要执行下面命令


我是用的centos直接在python项目下执行 yum install openldap-devel python-devel 这个吗?

ly131936964 发表于 2024-1-31 17:15:33

大炮运维V587 发表于 2024-1-31 16:34
您好,你的操作系统是哪个?
这个python-ldap需要单独安装
centos系列需要执行下面命令


python项目自带的requirements.txt安装一直失败 提示
Collecting mysqlclient==2.* (from -r /www/wwwroot/Archery/requirements.txt (line 2))
Using cached https://mirrors.aliyun.com/pypi/packages/37/fb/d9a8f763c84f1e789c027af0ffc7dbf94c9a38db961484f253f0552cbb47/mysqlclient-2.2.1.tar.gz (89 kB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'error'
error: subprocess-exited-with-error

大炮运维V587 发表于 2024-1-31 18:12:59

ly131936964 发表于 2024-1-31 17:15
python项目自带的requirements.txt安装一直失败 提示
Collecting mysqlclient==2.* (from -r /www/w ...

你把你的python虚拟环境路径发出来看看

ly131936964 发表于 2024-1-31 21:32:42

本帖最后由 ly131936964 于 2024-1-31 23:04 编辑

大炮运维V587 发表于 2024-1-31 18:12
你把你的python虚拟环境路径发出来看看
你好 如何才能通过shell指令 进入自己的项目虚拟空间? 我百度了一下 都是sourcetalkPro_venv/bin/activate   类似这样 我的项目里 找不到 activate我的项目路径是这个 www/server/pyporject_evn/Archery_venv/bin

铭心刻骨 发表于 2024-2-1 13:15:47

ly131936964 发表于 2024-1-31 21:32
你好 如何才能通过shell指令 进入自己的项目虚拟空间? 我百度了一下 都是sourcetalkPro_venv/bin/activ ...


现在不用这个了activate我的项目路径是这个 www/server/pyporject_evn/Archery_venv/bin这个是你的虚拟路径,执行命令即可,在bin后面输入   /pip3 list 等,









ly131936964 发表于 2024-2-1 13:32:14

铭心刻骨 发表于 2024-2-1 13:15


谢谢大佬我在其他帖子都看到你
页: [1]
查看完整版本: 【已完成】python安装Django项目 依赖安装不成功