批量安装two1 3.10.9所需的依赖包

    在Python编程中,是如下命令安装arrow依赖包时,

pip install -U arrow

    发现如下ERROR:


    出现该问题原因是有2个,一是pip安装命令的末尾添加--use-feature=2020-resolver字段,二是需要安装two1 3.10.9所需的依赖包。
    解决方法如下:
    1)将黑框框代理requires信息拷贝到pack.txt中,如下:
//pack.txt
two1 3.10.9 requires base58==0.2.2, which is not installed.
two1 3.10.9 requires click==6.6, which is not installed.
two1 3.10.9 requires docker-py==1.8.0, which is not installed.
two1 3.10.9 requires flake8, which is not installed.
two1 3.10.9 requires jsonrpcclient==2.0.1, which is not installed.
two1 3.10.9 requires jsonrpcserver==3.1.1, which is not installed.
two1 3.10.9 requires mnemonic==0.13, which is not installed.
two1 3.10.9 requires path.py, which is not installed.
two1 3.10.9 requires pexpect, which is not installed.
two1 3.10.9 requires protobuf==3.0.0a3, which is not installed.
two1 3.10.9 requires pyaes, which is not installed.
two1 3.10.9 requires pytest, which is not installed.

    2) 用notepad++打开上面的pack.txt,删除依赖包之外的字符串
    2.1)删除requires到行首的字符串,
    在Notepad++中,按Ctrl+H,勾选“正则表示式”,如下:
查找目标:

^.*(requires )

替换目标: 不填

点击[全部替换]。


图(2) 删除requires到行首的字符串

    2.2)删除,逗号到行尾的字符串
查找目标:

\,.*$

替换目标: 不填

点击[全部替换]。

图(3) 删除,逗号到行尾的字符串

    得到如下:

图(4) 最后得到依赖包列表文件: pack.txt

    最后生成的pack.txt

base58==0.2.2
click==6.6
docker-py==1.8.0
flake8
jsonrpcclient==2.0.1
jsonrpcserver==3.1.1
mnemonic==0.13
path.py
pexpect
protobuf==3.0.0a3
pyaes
pytest

    3)读取pack.txt,并进行安装

pip install -r pack.txt --use-feature=2020-resolver --default-timeout=10000

    或者

pip3 install -r pack.txt -i http://mirrors.aliyun.com/pypi/simple/ --use-feature=2020-resolver --default-timeout=10000

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值