Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QT4 = QT_VERSION[0] == "4" I don't know how to make it work. #1011

Closed
JI4JUN opened this issue Apr 24, 2022 · 4 comments
Closed

QT4 = QT_VERSION[0] == "4" I don't know how to make it work. #1011

JI4JUN opened this issue Apr 24, 2022 · 4 comments

Comments

@JI4JUN
Copy link

JI4JUN commented Apr 24, 2022

(Pytorch) G:\swin\Swin-Transformer-Object-Detection-master\data\instance_segmentation>python labelme2coco.py data_annotated data_dataset_coco --labels labels.txt
Traceback (most recent call last):
File "labelme2coco.py", line 16, in
import labelme
File "C:\ProgramData\Anaconda3\envs\Pytorch\lib\site-packages\labelme_init_.py", line 17, in
QT4 = QT_VERSION[0] == "4"
TypeError: 'NoneType' object is not subscriptable

@JI4JUN JI4JUN changed the title QT4 = QT_VERSION[0] == "4" I don't know how to make it works. QT4 = QT_VERSION[0] == "4" I don't know how to make it work. Apr 24, 2022
@travishsu
Copy link
Contributor

travishsu commented May 6, 2022

seems qt is not installed properly. try conda install qt or re-create env with conda create -n new_env python=3 qt pyqt pyside2 -y

edit:

correct to conda create -c conda-forge -n new_env python=3.9 qt pyqt pyside2 -y

@montmejat
Copy link

What worked for me without using conda:

pip install pyqt5
pip install qtpy

@sleepyheead
Copy link

I got the same error. When I tried to run 'labelme' in terminal, this error appear:

Traceback (most recent call last):
File "/usr/bin/labelme", line 33, in
sys.exit(load_entry_point('labelme==4.6.0', 'console_scripts', 'labelme')())
File "/usr/bin/labelme", line 25, in importlib_load_entry_point
return next(matches).load()
File "/usr/lib/python3.10/importlib/metadata/init.py", line 171, in load
module = import_module(match.group('module'))
File "/usr/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 992, in _find_and_load_unlocked
File "", line 241, in _call_with_frames_removed
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "/usr/lib/python3/dist-packages/labelme/init.py", line 17, in
QT4 = QT_VERSION[0] == "4"
TypeError: 'NoneType' object is not subscriptable

@HowcanoeWang
Copy link

seems qt is not installed properly. try conda install qt or re-create env with conda create -n new_env python=3 qt pyqt pyside2 -y

In case someone meet the conda pyside2 PackageNotFound error, please add conda-forge channel

conda create -c conda-forge -n new_env python=3 qt pyqt pyside2

@wkentaro wkentaro removed the bug issue label Sep 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants