question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

import qtpy raise except when only have PyQt4

See original GitHub issue

https://github.com/spyder-ide/qtpy/blob/61e84329ecd5bfb3a6ff822fa6ce9758be23516c/qtpy/__init__.py#L197

>>> import qtpy
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/python3.8/site-packages/qtpy/__init__.py", line 237, in <module>
    from . import QtDataVisualization as QtDatavisualization
  File "/python3.8/site-packages/qtpy/QtDataVisualization.py", line 22, in <module>
    raise PythonQtError('No Qt bindings could be found')

Why you remove the QT_API check before import QtDataVisualization since 1.11.2?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
ccordoba12commented, Nov 18, 2021

we’ll drop support in QtConsole at some point soon, if we haven’t already done so?

I doubt Qtconsole can still work with PyQt4 because it only supports Python 3.6+ (and I think there are no PyQt4 packages for that version).

1reaction
DengZuohengcommented, Nov 18, 2021

@dalthviz thanks for your prompt reply. And yes, we still using Qt4 now, and we going to upgrade to Qt5 next year. Before that we trying to upgrade qtconsole, and meet this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

PyQt - How to handle module import exceptions - Stack Overflow
Here's one possible fix for your problem: from PyQt4.QtCore import * from PyQt4.QtGui import * try: import enchant except ImportError: ...
Read more >
master - GitHub
Minimal Python 2 & 3 shim around all Qt bindings - PySide, PySide2, PyQt4 and PyQt5. ... raise AttributeError("'module' has no attribute 'getCppPointer'")....
Read more >
PyQt Gotchas | Fly, Crash, Raise Exception
PyQt and Qt have a fundamental conflict: memory management. ... import sys from PyQt4 import QtGui, QtCore class Main(QtGui.
Read more >
Pip and PyQt5 (#17254) · Issues - VTK - GitLab
qt.PyQtImpl to either PyQt4 or PySide before importing from the real module. What happens if you try importing vtk.qt.
Read more >
Python Programming/PyQt4 - Wikibooks, open books for an ...
It is important that you read the source code of the example files, most of the explanations are in the code. The best...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found