您现在的位置是:首页 > 科技 > IT

ERROR: No matching distribution found for queue python2.7安装queue模块的报错

火烧 2019-09-05 08:51:20 IT 1190
报错信息 ERROR: Could not find a version that satisfies the requirement queue (from versions: none) ERROR: No matching distributi...

报错信息

ERROR: Could not find a version that satisfies the requirement queue (from versions: none)
ERROR: No matching distribution found for queue

原因分析

通过pip search queue 确实没发现queue模块。按照报错信息进行网络搜索,发现是因为python2.X 和python3.X 对于queue模块的写法不同。python2.X必须是Queue, 而在python3.X 中,就修改成queue了。
坑啊~~

解决方案

在使用的地方,直接 import Queue就行了, 不要安装,Queue是python2.X 自带的库。

永远跟党走
  • 如果你觉得本站很棒,可以通过扫码支付打赏哦!

    • 微信收款码
    • 支付宝收款码