Closed Vignesh1230 closed 3 years ago
You might need to try
conda install -c conda-forge pyside2
conda install pyqt
or
pip install pyqt5 # pyqt5 can be installed via pip on python3
.
I have the same issue
hi@hihi:~/annolid$ annolid
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 584, in _build_master
ws.require(__requires__)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 901, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 792, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (PyQt5 5.15.4 (/home/hi/.local/lib/python3.8/site-packages), Requirement.parse('PyQt5!=5.15.3,!=5.15.4'), {'labelme'})
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/hi/.local/bin/annolid", line 6, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3254, in <module>
def _initialize_master_working_set():
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3237, in _call_aside
f(*args, **kwargs)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3266, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 586, in _build_master
return cls._build_from_requirements(__requires__)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 599, in _build_from_requirements
dists = ws.resolve(reqs, Environment())
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 787, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'PyQt5!=5.15.3,!=5.15.4' distribution was not found and is required by labelme
But with pip install pyqt5
like what you mentioned, it installs the version of pyqt that it doesn't want
hi@hihi:~/annolid$ pip install pyqt5
Requirement already satisfied: pyqt5 in /home/hi/.local/lib/python3.8/site-packages (5.15.4)
Requirement already satisfied: PyQt5-Qt5>=5.15 in /home/hi/.local/lib/python3.8/site-packages (from pyqt5) (5.15.2)
Requirement already satisfied: PyQt5-sip<13,>=12.8 in /home/hi/.local/lib/python3.8/site-packages (from pyqt5) (12.9.0)
Now if I install 5.15.2, i.e. pip install pyqt5==5.15.2
, I get
hi@hihi:~/annolid$ pip install pyqt5==5.15.2
Collecting pyqt5==5.15.2
Downloading PyQt5-5.15.2-5.15.2-cp35.cp36.cp37.cp38.cp39-abi3-manylinux2014_x86_64.whl (68.3 MB)
|████████████████████████████████| 68.3 MB 796 kB/s
Requirement already satisfied: PyQt5-sip<13,>=12.8 in /home/hi/.local/lib/python3.8/site-packages (from pyqt5==5.15.2) (12.9.0)
ERROR: pyqtwebengine 5.15.4 has requirement PyQt5>=5.15.4, but you'll have pyqt5 5.15.2 which is incompatible.
Installing collected packages: pyqt5
Attempting uninstall: pyqt5
Found existing installation: PyQt5 5.15.4
Uninstalling PyQt5-5.15.4:
Successfully uninstalled PyQt5-5.15.4
Successfully installed pyqt5-5.15.2
hi@hihi:~/annolid$ annolid
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 584, in _build_master
ws.require(__requires__)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 901, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 792, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (PyQt5 5.15.2 (/home/hi/.local/lib/python3.8/site-packages), Requirement.parse('PyQt5>=5.15.4'), {'PyQtWebEngine'})
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/hi/.local/bin/annolid", line 6, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3254, in <module>
def _initialize_master_working_set():
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3237, in _call_aside
f(*args, **kwargs)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3266, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 586, in _build_master
return cls._build_from_requirements(__requires__)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 599, in _build_from_requirements
dists = ws.resolve(reqs, Environment())
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 792, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (PyQt5 5.15.2 (/home/hi/.local/lib/python3.8/site-packages), Requirement.parse('PyQt5>=5.15.4'), {'PyQtWebEngine'})
A loop that I get... Is there any workaround for this?
Echoing @chestonchow
The proposed fix didn't help.. There seems to be some weird circular dependency problem.
Installing pyqt5 installs the latest version, 5.15.4. The issue is that labelme needs a version lower like 5.15.2.
The 'PyQt5!=5.15.3,!=5.15.4' distribution was not found and is required by labelme
So then I went ahead and installed 5.15.2 and ran the command annolid
, to the result of
pkg_resources.DistributionNotFound: The 'PyQt5>=5.15.4' distribution was not found and is required by PyQtWebEngine
.
(annotation) cerebro0@cerebro:~/annolid$ pip list
Package Version Location
----------------------- ------------------- ----------------------
absl-py 0.13.0
annolid 1.0.1 /home/cerebro0/annolid
cachetools 4.2.2
certifi 2021.5.30
charset-normalizer 2.0.3
cycler 0.10.0
Cython 0.29.24
decord 0.6.0
easydict 1.9
google-auth 1.33.1
google-auth-oauthlib 0.4.4
grpcio 1.39.0
idna 3.2
imgviz 1.2.6
importlib-metadata 4.6.1
kiwisolver 1.3.1
labelme 4.5.9
Markdown 3.3.4
matplotlib 3.2.2
numpy 1.21.1
oauthlib 3.1.1
opencv-contrib-python 4.1.2.30
opencv-python 4.1.2.30
opencv-python-headless 4.1.2.30
pandas 1.3.1
Pillow 8.3.1
pip 21.1.3
protobuf 3.17.3
pyasn1 0.4.8
pyasn1-modules 0.2.8
pycocotools 2.0.2
pyparsing 2.4.7
PyQt5 5.15.2
PyQt5-Qt5 5.15.2
PyQt5-sip 12.9.0
PyQtWebEngine 5.15.2
python-dateutil 2.8.2
pytz 2021.1
PyYAML 5.4.1
QtPy 1.9.0
requests 2.26.0
requests-oauthlib 1.3.0
rsa 4.7.2
scipy 1.7.0
setuptools 52.0.0.post20210125
six 1.16.0
tensorboard 2.5.0
tensorboard-data-server 0.6.1
tensorboard-plugin-wit 1.8.0
termcolor 1.1.0
torch 1.4.0+cpu
torchvision 0.5.0+cpu
typing-extensions 3.10.0.0
urllib3 1.26.6
Werkzeug 2.0.1
wheel 0.36.2
zipp 3.5.0
It doesnt make sense that the version is PyQtWebEngine 5.15.2, while simultaneously requesting a version thats 2 newer?
PyQt5>=5.15.4' distribution was not found and is required by PyQtWebEngine
Not sure what's happening
It seems that your env is
using cached PyQtWebEngine-5.15.4-cp36.cp37.cp38.cp39-abi3-manylinux2014_x86_64.whl.
How about try this command pip install PyQtWebEngine==5.15.2
?
Having PyQt5 version issues when installing and running annolid. Ive attached the terminal logs. Annolid was installed in a new condo environment.
Any ideas on how to fix this?