Can't renew after updating python version

When I update I kept on getting this message.

/opt/ CryptographyDeprecationWarning: Support for your Python version is deprecated. The next version of cryptography will remove support. Please upgrade to a release (2.7.7+) that supports hmac.compare_digest as soon as possible.

So I updated python to version 2.7.16… but now its broke totally and get this now ?

./certbot-auto renew
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 6, 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

Try renaming /opt/ so that certbot-auto will reinstall itself.

What OS are you using? How did you upgrade Python?

1 Like

I am using Ubuntu 14.04 LTS.

I had some problems updating , but used this in the end

sudo add-apt-repository ppa:jonathonf/python-2.7

python -V
Python 2.7.16

I ran
rm -rf /opt/*

Then ran
./certbot-auto renew

Looks like certbot installed itself, and looks like that solved the problem. Thanks! :slight_smile:

1 Like

breathes yet a bit more life into a 14.04 LTS …

Yeah, updating to a newer version of Ubuntu isn’t going to be fun with all the old sites I am running. I tried updating php a while ago, all hell broke loose :frowning:

I have no good advice for you there…
Best of luck! (when the time comes) :slight_smile:

1 Like

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