pip:Could not find a version that satisfies the requirement Twisted==15.5.0 (from versions: none)

pip安装某些包失败
因为网络原因,这种情况指定安装源就好:

pip install SomeProject -i http://my.package.repo/simple/ 

常用源:
阿里云 http://mirrors.aliyun.com/pypi/simple/
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
豆瓣(douban) http://pypi.douban.com/simple/
清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/
中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple/
官方源:https://pypi.org/simple/

但今日遇到的不是这个原因,而是因为Twisted这个包是bz2的包:
https://pypi.org/simple/twisted/
https://pypi.org/simple/twisted/
因为没有安装bzip2-devel的系统包导致pip不支持bz2后缀的包。
解决办法:

yum install bzip2-devel

重新编译python3即可。

不想重新编译python3的话,也可以直接下载要安装的包,解压再安装:

wget https://files.pythonhosted.org/packages/de/75/7495f210c6bb6af33a09f81f5f351a47f12b9989ee8e3c4623e95ece3c97/Twisted-15.5.0.tar.bz2#sha256=a8046804a0dfae090234bbb90fc560a6cc11a208b3d048b55244c79c1945c17f
bzip2 -d Twisted-15.5.0.tar.bz2
python3 install ./Twisted-15.5.0.tar

安装成功。

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值