Cannot import name _remove_dead_weakref Ubuntu 14.04.4

after the last update I saw this line in the logs:
/opt/ CryptographyDeprecationWarning: Support for your Python version is deprecated. The next version of cryptography will remove support. Please upgrade to a 2.7.x release that supports hmac.compare_digest as soon as possible.

then update all
and no longer starts

I run this command:
/root/letsencrypt/letsencrypt-auto renew --force-renewal && /etc/init.d/apache2 reload

It produced this output:

Error: couldn’t get currently installed version for /opt/
Traceback (most recent call last):
File “/opt/”, line 7, in
from certbot.main import main
File “/opt/”, line 5, in
import logging.handlers
File “/usr/lib/python2.7/logging/”, line 26, in
import sys, os, time, cStringIO, traceback, warnings, weakref, collections
File “/usr/lib/python2.7/”, line 14, in
from _weakref import (
ImportError: cannot import name _remove_dead_weakref

My web server is (include version):
apache 2.4.38

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

I can login to a root shell on my machine (yes):

The main problem is this version is no long supported:

See: Releases - Ubuntu Wiki

You may need to upgrade that to a new release to continue to get all the latest packages.

It’s still supported for the next couple weeks.

_weakref is a built-in module, it shouldn’t possibly be able to malfunction.

Maybe rename or delete /opt/ to reinstall Certbot and rebuild the Python virtualenv?

14.04.6, yes.

but not 14.04.4:

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