Open gustavz opened 6 years ago
I have the same issue
I meet the same issue,
I also have the same issue.
I met the same issue too.
I met the same issue too.
I met this issue too .when I uninstall pyqt4 and use pyqt5 instead,I solve the problem!
same issue +1.
if I use pyqt5:
ImportError: No module named PyQt4.QtGui
If you are using pyqt5, you should call 'make qt4py2' or 'makr qt5py2'
I had both pyqt5 and pyqt4 installed and got the same problem. When I uninstalled pyqt5 it worked.
"make qt4py2" worked for me
If there is an error for calling 'make qt4py2' or 'make qt5py2', do 'make qt4' or 'make qt5' first.
I edited libs/ustr.py:
I got the issue but "make qt4py3" didn't workðŸ˜
I edited libs/ustr.py:
1. comment this line:#from PyQt4.QtCore import QString 2. change this:if type(x) == QString to this:if type(x) ==type('string') and it works
Worked for me, thanks! First, i uninstalled qt4, installed qt5, then make qt5py3, then applied your solution (don't forget ' : ')
I have the same issue
I have the same issue when use the py2+qt4,but when i build a conda virtual environment for py3+qt5,it works.
So, before executing ur python file, make sure to create a virtual env. Worked for me
I edited libs/ustr.py:
1. comment this line:#from PyQt4.QtCore import QString 2. change this:if type(x) == QString to this:if type(x) ==type('string') and it works
Worked for me, thanks! First, i uninstalled qt4, installed qt5, then make qt5py3, then applied your solution (don't forget ' : ')
Where is libs/ustr.py: ? (I'm using Windown 11)
I am working with python 2.7 so i wanted to use PyQt4. But when i follow the guide
sudo apt-get install pyqt4-dev-tools
sudo pip install lxml
make qt4py2
python labelImg.py
it gives me following error:
$ python labelImg.py Traceback (most recent call last): File "labelImg.py", line 27, in <module> import resources File "/home/gustav/DataSet/labelImg/resources.py", line 9, in <module> from PyQt4 import QtCore RuntimeError: the PyQt4.QtCore and PyQt5.QtCore modules both wrap the QObject class
although i do not have PyQt5 installed, only PyQt4. (The same happens if i install globaly with pip (or pip2))
But however if i follow the same steps for python 3 and PyQt5 it works perfectly fine.
The thing is, i really would prefer to use the py2.7.
Any suggestions how to solve this?