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

The 'PyQt5' distribution was not found and is required by veusz #475

Open
yurivict opened this issue Nov 30, 2020 · 4 comments
Open

The 'PyQt5' distribution was not found and is required by veusz #475

yurivict opened this issue Nov 30, 2020 · 4 comments

Comments

@yurivict
Copy link

veusz-3.3 fails:

$ veusz
Traceback (most recent call last):
  File "/usr/local/bin/veusz", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/usr/local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3251, in <module>
    @_call_aside
  File "/usr/local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3235, in _call_aside
    f(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3264, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 583, in _build_master
    ws.require(__requires__)
  File "/usr/local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 900, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 786, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'PyQt5' distribution was not found and is required by veusz

But regular examples involving PyQt5 work fine.

OS: FreeBSD 12.2

@jeremysanders
Copy link
Collaborator

I'm not sure how you installed veusz. It seems to be some problem with your PyQt5 installation. Maybe it's related to this report: pypa/setuptools#1445

@yurivict
Copy link
Author

yurivict commented Dec 7, 2020

The problem seems to be in setuptools. I created a new report: pypa/setuptools#2474

@jeremysanders
Copy link
Collaborator

jeremysanders commented Dec 10, 2020

I've run into this problem with the PPA package on Ubuntu Linux (Bionic). Searching around led me to this bug:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=891618

It looks like they disabled PyQt5 from install_requires to fix the bug. I tried patching this in Veusz which seems to work. It doesn't need the patch for more recent Ubuntu versions.

Index: veusz-3.3.1/setup.py
===================================================================
--- veusz-3.3.1.orig/setup.py
+++ veusz-3.3.1/setup.py
@@ -37,7 +37,7 @@ try:
     from setuptools import setup, Extension
     from setuptools.command.install import install as orig_install
 
-    extraoptions['install_requires'] = ['numpy', 'PyQt5']
+    extraoptions['install_requires'] = ['numpy']
     extraoptions['extras_require'] = {
         "optional": ['astropy', 'pyemf', 'sampy', 'iminuit', 'h5py']
     }

Maybe this is due to a packaging problem for PyQt5 on FreeBSD? The PyQt5 metadata setuptools uses could be missing.

@yurivict
Copy link
Author

Same as pypa/setuptools#2474

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

2 participants