pyqt安装pyqtchart的问题解决与代码提示

最近在配置pyqtchart时候,pip安装的时候一直卡在,最后卡的我的unbuntu界面啥都动不了,最后只能无奈关机。

这里是安装过程,可见一直卡在Preparing wheel metadata ... -。

Collecting PyQtChart
  Using cached PyQtChart-5.15.6-cp37-abi3-manylinux1_x86_64.whl (306 kB)
Collecting PyQt5-sip<13,>=12.11
  Using cached PyQt5_sip-12.13.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl (335 kB)
Collecting PyQtChart-Qt5>=5.15.0
  Using cached PyQtChart_Qt5-5.15.2-py3-none-manylinux2014_x86_64.whl (925 kB)
Collecting PyQt5>=5.15.4
  Using cached PyQt5-5.15.10.tar.gz (3.2 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... -

最后查阅资料发现pyqtchart对pyqt5版本有依赖,所以就安装了二者相同的版本,就成功了

pyqt5安装对应版本,这里是5.15.0使用清华源

 pip install PyQt5==5.15.0 -i https://pypi.tuna.tsinghua.edu.cn/simple

pyqtchart安装对应版本,这里是5.15.0使用清华源

pip install PyQtChart==5.15.0 -i https://pypi.tuna.tsinghua.edu.cn/simple

安装时二者须对应版本,不然pyqtchart可能无法使用

查看pyqt5与pyqtchart是否安装

pip3 show pyqt5
pip3 show PyQtchart

安装pyqt-stubs使得pyqt有代码提示

pip show PyQt5-stubs

参考文章

https://blog.csdn.net/qq527703883/article/details/116536345

【Python】pip配置清华镜像源_python清华镜像源-CSDN博客

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值