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
Related
I've used pip install pymatgen with Python 3.9.1 on Windows 10 to install pymatgen, but I'm getting the following error:
Traceback (most recent call last):
File "D:\code\pymatgen\pymatgen.py", line 1, in <module>
import pymatgen.core as mg
File "D:\code\pymatgen\pymatgen.py", line 1, in <module>
import pymatgen.core as mg
ModuleNotFoundError: No module named 'pymatgen.core'; 'pymatgen' is not a package
I have also tried to install the previous 2 versions but still getting the same error though I can already see it in the pip list
pymatgen 2022.3.22
What am I missing?
Maybe try using conda ? if this doesn't work then there is definitely some dependencies issue
https://pymatgen.org/installation.html
I'm certain that I have installed the library using pip and it has returned the confirmation that it has been installed. When the import command is run, it throws a ModuleNotFoundError.This problem is not exclusive to this particular library and none of the libraries that are not included in the python default package works.
The code is:
>>> from PyQt5 import Qwidgets Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: cannot import name 'Qwidgets' from 'PyQt5' (C:\Users\Franklin Joe\AppData\Local\Programs\Python\Python38-32\lib\site-packages\PyQt5\__init__.py)
I'm trying to work on python3 and using mac. I have installed pyobjc-core and pyobjc, but the error said Quartz not found. I'm very new to this kind of installing. Is there any solution?
Here is my error from pycharm:
Traceback (most recent call last):
File "/Users/Thyme/PycharmProjects/DinosourBot/venv/lib/python3.6/site-packages/pyautogui/_pyautogui_osx.py", line 5, in <module>
import Quartz
ModuleNotFoundError: No module named 'Quartz'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/Thyme/PycharmProjects/DinosourBot/Bot.py", line 2, in <module>
import pyautogui
File "/Users/Thyme/PycharmProjects/DinosourBot/venv/lib/python3.6/site-packages/pyautogui/__init__.py", line 110, in <module>
from . import _pyautogui_osx as platformModule
File "/Users/Thyme/PycharmProjects/DinosourBot/venv/lib/python3.6/site-packages/pyautogui/_pyautogui_osx.py", line 7, in <module>
assert False, "You must first install pyobjc-core and pyobjc: https://pyautogui.readthedocs.io/en/latest/install.html"
AssertionError: You must first install pyobjc-core and pyobjc: https://pyautogui.readthedocs.io/en/latest/install.html
Process finished with exit code 1
In case anyone stumbles here use:
pip install pyobjc-framework-Quartz
I have solved the problem by
installing pyobjc-framework-Quartz,
it's provided by pycharm
I'd suggest it's best to install all of pyObjC, rather than just specific frameworks. Invariably, if you're working with Quartz, you're going to need various CoreFoundation objects and constants at the very least. To say nothing of AppKit, or other frameworks, depending on what you're doing.
pip install pyobjc (or pip3) should install everything and let you import Quartz. (It works for me on several pythons!)
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.
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.