[Python-modules-team] Bug#844990: pycodestyle: missing versioned dependency of pycodestyle on python3-pycodestyle

Johannes Schauer josch at debian.org
Sat Nov 19 08:36:41 UTC 2016

Package: pycodestyle
Version: 2.2.0-1
Severity: serious
Justification: Policy 7.2


I recently upgraded pycodestyle 2.0.0-1 to 2.2.0-1. Whenever I run
pycodestyle, now I get:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 635, in _build_master
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 943, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 834, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.VersionConflict: (pycodestyle 2.0.0 (/usr/lib/python3/dist-packages), Requirement.parse('pycodestyle==2.2.0'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/pycodestyle", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2953, in <module>
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2939, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2966, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 637, in _build_master
    return cls._build_from_requirements(__requires__)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 650, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 829, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'pycodestyle==2.2.0' distribution was not found and is required by the application

I guess this is because I still have python3-pycodestyle in version
2.0.0-1 installed. It wasn't upgraded because pycodestyle is missing a
versioned dependency on it. Since pycodestyle and python3-pycodestyle
are in the same source package, you might want to write in your

Depends: python3-pycodestyle (= ${binary:Version})

Upgrading python3-pycodestyle to version 2.2.0-1 fixed my problem.


cheers, josch

More information about the Python-modules-team mailing list