pip 安装时报错Double requirement given: numpy==1.12.1....

使用pip install -r requirements.txt 命令批量安装模块时,报错:

Double requirement given: numpy==1.12.1 from https://files.pythonhosted.org/packages/d8/f9/97aa0903ae39ed4ab6df1c9c22902f3c71f4330a54cf5a81b2bea585544d/numpy-1.12.1-cp27-cp27m-manylinux1_x86_64.whl#sha256=ca917155b35b3bcc68ef1ad82570a29414f5088495ea8f68c65b071c50e64340 (already in numpy==1.9.3 from https://files.pythonhosted.org/packages/f8/63/eca0990ba29244de118489d82ab7511d72cc02bf8ae81ca1aa2a4774d087/numpy-1.9.3-cp27-cp27m-manylinux1_x86_64.whl#sha256=da1563ede37a54c2bd5ab3cb3def94c386f4c7482242cdb7921c22756bbeb461, name='numpy')

从Stack Overflow上查到的解决办法, 出现这个问题是因为当前安装的模块与现有的环境中的模块冲突,加上这个参数后,可以禁止构建隔离,参考 https://pip.pypa.io/en/stable/reference/pip/

解决办法:

pip install -r requirements.txt --no-build-isolation

 

把当前环境依赖的模块,导出到一个文件的命令:pip freeze > requirements.txt

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值