It produced this output: Traceback (most recent call last): File "/home/deblad/.local/bin/certbot", line 6, in <module> from certbot.main import main ModuleNotFoundError: No module named 'certbot'
My web server is (include version): Nginx/1.18.0
The operating system my web server runs on is (include version): Debian 10
My hosting provider, if applicable, is: Linode
I can login to a root shell on my machine (yes or no, or I don't know): yes
I'm using a control panel to manage my site (no, or provide the name and version of the control panel): no
The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot): Certbot 1.9.0
I have been using the certbot package from the Debian repositories, but I noticed that it was heavily out-of-date including the fact that it was missing some, in my opinion, important security updates: Certbot version 0.31.0-1. Thus, I decided to switch to the Pip package, but I have had issues with it using dependencies from the apt package that I tried to purge from the system with sudo apt purge certbot python3-certbot-nginx. After getting it fixed so that I could finally install the Pip version of certbot, I ran into the issue in that it is not in my $PATH anymore. So I just created an alias in ~/.bash_aliases using the command alias certbot='sudo ~/.local/bin/certbot' Well now it complains that an import module isn't installed which is really confusing. When I rerun pip install certbot I get the following output:
Requirement already satisfied: certbot in ./.local/lib/python3.7/site-packages (1.9.0)
Requirement already satisfied: acme>=1.8.0 in ./.local/lib/python3.7/site-packages (from certbot) (1.9.0)
Requirement already satisfied: zope.interface in /usr/lib/python3/dist-packages (from certbot) (4.3.2)
Requirement already satisfied: josepy>=1.1.0 in /usr/lib/python3/dist-packages (from certbot) (1.1.0)
Requirement already satisfied: pytz in /usr/lib/python3/dist-packages (from certbot) (2019.1)
Requirement already satisfied: ConfigArgParse>=0.9.3 in /usr/lib/python3/dist-packages (from certbot) (0.13.0)
Requirement already satisfied: cryptography>=1.2.3 in /usr/lib/python3/dist-packages (from certbot) (2.6.1)
Requirement already satisfied: parsedatetime>=1.3 in /usr/lib/python3/dist-packages (from certbot) (2.4)
Requirement already satisfied: distro>=1.0.1 in ./.local/lib/python3.7/site-packages (from certbot) (1.5.0)
Requirement already satisfied: pyrfc3339 in /usr/lib/python3/dist-packages (from certbot) (1.1)
Requirement already satisfied: zope.component in /usr/lib/python3/dist-packages (from certbot) (4.3.0)
Requirement already satisfied: configobj in /usr/lib/python3/dist-packages (from certbot) (5.0.6)
Requirement already satisfied: setuptools in /usr/lib/python3/dist-packages (from certbot) (40.8.0)
Requirement already satisfied: PyOpenSSL>=0.15.1 in /usr/lib/python3/dist-packages (from acme>=1.8.0->certbot) (19.0.0)
Requirement already satisfied: requests-toolbelt>=0.3.0 in /usr/lib/python3/dist-packages (from acme>=1.8.0->certbot) (0.8.0)
Requirement already satisfied: requests[security]>=2.6.0 in /usr/lib/python3/dist-packages (from acme>=1.8.0->certbot) (2.21.0)
Requirement already satisfied: six>=1.9.0 in /usr/lib/python3/dist-packages (from acme>=1.8.0->certbot) (1.12.0)
Requirement already satisfied: idna>=2.0.0 in /usr/lib/python3/dist-packages (from requests[security]>=2.6.0->acme>=1.8.0->certbot) (2.10)
Also I have considering removing some of those packages in the /usr/lib/python3/dist-packages directory since that is what worked when my apt purge command failed (sudo rm -rf /usr/lib/python3/dist-packages/certbot* for the record), but I am afraid that may break my system since I don't know if other debian packages require those as dependencies.
For the record, my switch to Nginx comes with its own headache and so my site is horribly broken rn. But my switch to Nginx is why the root domain has no CSS if you go to it.
Yes. The Purge is supposed to remove the package in addition to its configuration files and related stuff. I am just going to redo the OS completely because, apt is being a piece of shit like it normally likes to do (ugh why I switched to Arch on my desktop). While it is "production", it is my own personal server so isn't as important.
I feel you. Things can become a right mess very quickly. Certbot is switching exclusively to snaps I believe, so I'm not sure avoiding it will be beneficial in the long run.
Snaps, in my opinion are horrible. I don't know if Pip is officially supported by EFF, but it should be because Pip is Amazing. (I guess you could say that it is the python version of node.js if my understanding of node.js is correct)
This is a headache as well... Originally I used the debian package for this, but discovered that there was an official debian repo maintained by the Nginx project itself. Switching from the main debian repo to the Nginx repo was a headache too.