关于python的一次报错处理ansible 1.9.4 has requirement pycrypto>=2.6, but you'll have pycrypto 2.4.1 which is ...

出现报错:

ansible 1.9.4 has requirement pycrypto>=2.6, but you'll have pycrypto 2.4.1 which is incompatible.

这个好弄(坑),直接去官网下载源码包安装就可以了(无语,还是太年轻),你猜到了结果还是不行继续报错,报错还是一模一样。。。。。。。。。。。。。。。

使用pip  list   查看确实已经跟新版本了,但是为啥还报错呢?

使用pip  uninstall 卸载这个pycrypto包提示

Cannot uninstall 'pycrypto'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.,妈蛋的着了半天没找到方法。

结果看pip文档发现下面的这段话。。。。。。。。。。。。

ip is able to uninstall most installed packages. Known exceptions are:

  

  - Pure distutils packages installed with ``python setup.py install``, which

    leave behind no metadata to determine what files were installed.

  - Script wrappers installed by ``python setup.py develop``.

明白了吧,pip不能够卸载使用源码包安装的扩展。。。。。。。。。。。。

找到源码包安装后的路径,直接删除掉

rm -rf /usr/lib64/python2.7/site-packages/pycrypto-2.6.1-py2.7.egg-info   

在用pip list 查看版本已经降下来了成为2.4的了。。。。吼吼

pip uninstall pycrypto 卸载掉,在用pip  install pycrypto  重新安装,默认就是2.6版本了(python2.7目前是这样的2018/5/8)

 

这个问题解决了:

总结:pip 不可以卸载使用源码安装的扩展,最好使用pip install 安装需要的扩展!!!!!!!!!!!

转载于:https://www.cnblogs.com/tugeboke/p/9009526.html

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值