简体   繁体   English

Qt库与Pycharm全新安装不兼容

[英]Qt library incompatibility with Pycharm new installation

I installed a new version of Pycharm (2019.3.1) and running my old codes on them.我安装了新版本的 Pycharm(2019.3.1)并在它们上运行我的旧代码。 But I am getting error for qt library incompatibility.但我收到 qt 库不兼容的错误。 I tried to update the qt package from conda (as I am using conda distribution for the python).我试图从 conda 更新 qt 包(因为我使用的是 python 的 conda 发行版)。 I noticed the following behavior -我注意到以下行为 -

  1. The error comes only for the plotting (which makes sense as qt is for graphical purposes).错误仅用于绘图(这是有道理的,因为 qt 用于图形目的)。
  2. There is no problem in code compilation and running, as it shows the result for the 1 epoch (can be seen in the below image.代码编译和运行没有问题,因为它显示了第1个时期的结果(可以在下图中看到。
  3. My installed qt version is 5.9 (you can see in the second image)我安装的qt版本是5.9(你可以在第二张图中看到)

The same code runs perfectly in spider but throwing the below error in pycharm.相同的代码在蜘蛛中完美运行,但在 pycharm 中抛出以下错误。 Please help me to fix this problem.请帮我解决这个问题。 thanks谢谢

pycharm 抛出的错误

通过 anaconda 控制台显示的 QT 版本

From error message you posted it is clear that you have library incompatibility problem.从您发布的错误消息中可以明显看出您有库不兼容问题。

Somehow it appears you have 2 Qt versions installed - 5.9.7 and 5.12.4 and these versions have conflict with each other.不知何故,您似乎安装了 2 个 Qt 版本 - 5.9.7 和 5.12.4,并且这些版本相互冲突。 You need to verify Run configuration in PyCharm to see which python environment it uses.您需要在 PyCharm 中验证 Run 配置以查看它使用的 Python 环境。 And then check why 2 Qt are available in your system.然后检查为什么 2 Qt 在您的系统中可用。

Anothe option that comes to my mind - your PyQt5 or PySide2 (whatever you use) library is built with Qt 5.12.4 while your system have 5.9.7 and it brings a conflict.我想到的另一个选项 - 你的 PyQt5 或 PySide2(无论你使用什么)库是用 Qt 5.12.4 构建的,而你的系统是 5.9.7,它会带来冲突。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM