[FYI] Latest Certbot asking for acme 1.17.0.dev0 while latest release is 1.16.0

Just something informative

My domain is: stevoh.dev (doesn't work yet, was preparing everything in a new machine when the error came up)

I ran this command: /usr/bin/certbot --version

It produced this output:

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: (acme 1.16.0 (/usr/local/lib/python3.8/dist-packages/acme-1.16.0-py3.8.egg), Requirement.parse('acme>=1.17.0.dev0'), {'certbot'})

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/certbot", 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 'acme>=1.17.0.dev0' distribution was not found and is required by certbot

My web server is (include version): Apache/2.4.41

The operating system my web server runs on is (include version): Ubuntu 20.04.2

I can login to a root shell on my machine: yes, I am g-root.

I'm using a control panel to manage my site: no

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot): Installed certbot 1.16.0 using snap, but tried installing it from git itself with no success.

Extra information: Other installations are working fine (several virtual machines, but with versions 1.9.0 and 1.10.0). However, can't install the latest because it fails due to the same reason, not finding acme 1.17.0.dev0. Latest version is 1.16.0, released on June 1st, 2021 (acme · PyPI). Attached screenshot for reference. Was able to install a previous version, so it's not a stopper, but maybe something going on and wanted to let you know about it.

Thanks!

This is probably what's gone wrong.

If you tried to use pip install from the git repository, without using a virtual environment, it would have polluted your system's Python packages and resulted in this version conflict.

For future reference, there are instructions for safely installing Certbot via pip.

Using the Certbot snap should cleanly avoid all of these issues, because it is fully isolated from whatever Python packages you have on the rest of your system. You might need to remove that /usr/local/bin/certbot file though - it's a remnant of trying to use pip install.

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.