BasioMeusPuga / Lector

Qt based ebook reader
GNU General Public License v3.0
1.51k stars 207 forks source link

Pyqt5 error #15

Closed DukeValentine closed 6 years ago

DukeValentine commented 6 years ago

I installed the application from the aur into my desktop. When I launch it gives me this error: pkg_resources.DistributionNotFound:The 'PyQt5>=5.10.1' distribution was not found and is required by lector However, I have this package installed already: sudo pacman -Ss pyqt5 extra/pyqt5-common 5.10.1-1 [installed] Common PyQt files shared between python-pyqt5 and python2-pyqt5 extra/python-pyqt5 5.10.1-1 [installed] A set of Python 3.x bindings for the Qt5 toolkit

BasioMeusPuga commented 6 years ago

I've removed version checks from the setup.py altogether. I really don't like how unreliable it's being. See if that fixed it?

DukeValentine commented 6 years ago

It's giving another error now:

Traceback (most recent call last): File "/usr/bin/lector", line 6, in from pkg_resources import load_entry_point File "/usr/lib/python3.6/site-packages/pkg_resources/init.py", line 3195, in @_call_aside File "/usr/lib/python3.6/site-packages/pkg_resources/init.py", line 3179, in _call_aside f(*args, **kwargs) File "/usr/lib/python3.6/site-packages/pkg_resources/init.py", line 3208, in _initialize_master_working_set working_set = WorkingSet._build_master() File "/usr/lib/python3.6/site-packages/pkg_resources/init.py", line 681, in _build_master ws.require(requires) File "/usr/lib/python3.6/site-packages/pkg_resources/init.py", line 999, in require needed = self.resolve(parse_requirements(requirements)) File "/usr/lib/python3.6/site-packages/pkg_resources/init.py", line 885, in resolve raise DistributionNotFound(req, requirers) pkg_resources.DistributionNotFound: The 'PyQt5' distribution was not found and is required by lector

trinaldi commented 6 years ago

@DukeValentine I'm using Arch Linux, FWIW. A simple 'pip3 install pyqt5' did the trick.

amitbha commented 6 years ago

Same problem. The system installation of python-pyqt5 is not found by lector.

BasioMeusPuga commented 6 years ago

I'm almost certain this isn't my bug based on the fact that I can find references to exactly this at other places.

In any case, I've decided on the nuke it from orbit option until a workaround can be found. The setup.py no longer checks for the PyQt installation.

amitbha commented 6 years ago

Manjaro Linux with package python-pyqt5 5.10.1-1 installed. Lector installed from aur.

# lector 
Traceback (most recent call last):
  File "/usr/bin/lector", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3195, in <module>
    @_call_aside
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3179, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3208, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 681, in _build_master
    ws.require(__requires__)
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 999, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 885, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'PyQt5' distribution was not found and is required by lector
BasioMeusPuga commented 6 years ago

@amitbha This is a compile from the latest master? Because like I said, the setup.py doesn't even check for PyQt5 anymore. If it were an issue with Lector proper, we'd be getting an ImportError.

Also, try pip install pyqt5

amitbha commented 6 years ago

The aur version having problem is: pkgver=r198.50089cb-1 After yaourt -S lector-git, it works well. 😌 Yet no .desktop file, only start it from terminal.

DukeValentine commented 6 years ago

Weirdly enough, trying to install once again worked. It launches without any errors now.