PyQt4 QtCore.so symbol not found error - python

I installed sip and PyQt but when i execute a python code like python tutorial.py , take this error. I installed pyqt with brew install and configure.py both.
Traceback (most recent call last):
File "untitled.py", line 4, in <module>
from PyQt4 import QtCore, QtGui
ImportError: dlopen(/Library/Python/2.7/site-packages/PyQt4/QtCore.so, 2): Symbol not found: __ZN10QArrayData11shared_nullE
Referenced from: /Library/Python/2.7/site-packages/PyQt4/QtCore.so
Expected in: flat namespace
in /Library/Python/2.7/site-packages/PyQt4/QtCore.so

I Solved this problem with delete Python and installing python and pyqt with macPorts.

Related

ImportError: dlopen(/usr/local/lib/python3.9/site-packages/PyQt5/QtWidgets.abi3.so, 2): Symbol not found: _InitSignatureStrings

I am trying to make work my python code on Mac OS Catalina 10.15 with Python 3.9
I get this error message when I run my code:
Traceback (most recent call last):
File "/Users/alisa/Dropbox/cff/Python/Project/MyScript.py", line 139, in <module>
from PyQt5 import QtWidgets, uic
ImportError: dlopen(/usr/local/lib/python3.9/site-packages/PyQt5/QtWidgets.abi3.so, 2): Symbol not found: _InitSignatureStrings
Referenced from: /usr/local/lib/python3.9/site-packages/PySide2/libpyside2.abi3.5.15.dylib
Expected in: /usr/local/lib/python3.9/site-packages/PySide2/libshiboken2.abi3.5.15.dylib
in /usr/local/lib/python3.9/site-packages/PySide2/libpyside2.abi3.5.15.dylib
Does anyone have any idea about how to fix this issue, please?

PyQT5 Unable to run qtdemo.py : ValueError: PyCapsule

I have installed sip-4.19.13 and PyQt5_gpl-5.11.3 (by specifiying ./configure.py --sip <path>) on a Raspberry PI 3 from sources (no packages found with apt or pip).
However, I can't manage to run qtdemo.py in the examples folder:
>>> from PyQt5 import QtCore
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: PyCapsule_GetPointer called with incorrect name
How can I fix it? I've googled it but not found any solutions...
I have the same problem with installed PyQt5_gpl-5.12,
from PyQt5.QtWebEngineWidgets import * ValueError: PyCapsule_GetPointer called with incorrect name,
then pip uninstall PyQt5 and pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pyqt5==5.10.1

ImportError: cannot import name QtWebKit when using PySide

I am trying to get my old project clipmanager building and I am encountering the following error:
/home/user/.virtualenvs/clipmanager27/bin/python /home/user/development/clipmanager/clipmanager/app.py
Traceback (most recent call last):
File "/home/user/development/clipmanager/clipmanager/app.py", line 15, in <module>
from mainwindow import MainWindow
File "/home/user/development/clipmanager/clipmanager/mainwindow.py", line 12, in <module>
import dialogs
File "/home/user/development/clipmanager/clipmanager/dialogs.py", line 8, in <module>
from PySide import QtWebKit
ImportError: cannot import name QtWebKit
Process finished with exit code 1
I installed Pyside with pip install pyside. I do not even see QtWebKit.so in the site packages folder /home/user/.virtualenvs/clipmanager27/lib/python2.7/site-packages/PySide:
Did it get removed due to licensing?
For Arch Linux, install qt4 and also qtwebkit before installing PySide.

Why can't I import PyQt in Python files?

I have installed PyQt using brew but when I am trying to import it, I just receive errors as follows:
>>> from PyQt4 import QtCore, QtGui
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named PyQt4
>>> from PyQt5 import QtCore, QtGui
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named PyQt5
Here's the command I used in terminal for installing PyQt in OSX:
brew install python qt pyqt pyside pyside-tools
Any idea what's gone wrong?
The most painless way to do python without messing around with modules is to install distributions. Two very good ones are Canopy Python and Anaconda. They have most, if not all, modules you are going to need for production. Pyqt and pyside are included in both of these distributions.

"ImportError: No module named PyQt42

I am trying to import spynner into my python program (import spynner) ... when I run the script, I receive the following error message:
Traceback (most recent call last):
File "C:\Users\Michael\Desktop\webscraper.py", line 2, in <module>
import spynner
File "build\bdist.win32\egg\spynner\__init__.py", line 2, in <module>
File "build\bdist.win32\egg\spynner\browser.py", line 52, in <module>
ImportError: No module named PyQt4
I then tried to install this module called PyQt4 (pip install PyQt4), which resulted in the following error message:
Could not find any downloads that satisfy the requirement Pyqt4
How can this problem be solved?
PyQt is available for download from Riverbank.
You can get PyQt4 here: http://www.riverbankcomputing.com/software/pyqt/download
They have links to both the source (so you can build it yourself) or binary packages.
If you need the PyQt documentation for the various classes the framework provides, you get get that from here

Categories

Resources