The pip install command can be used to install Certbot.
pip install certbot
Or, a specific version of Certbot can be installed.
pip install certbot==2.6.0
Or, better yet, use a requirements.txt file.
certbot==2.6.0
And then install the packages using the requirements.txt file.
pip install --requirement requirements.txt
The pip list should then include certbot.
~]$ pip list
Package Version
------------------ ---------
certbot 2.6.0
Modern Linux systems often only have Python version 3. However, older Linux systems often have both Python version 2 and Python version 3. The plain old "python" command is almost always /usr/bin/python which might be Python version 2 or Python version 3.
~]$ which python
/usr/bin/python
In this example, /usr/bin/python is a symbolic link to /usr/bin/python2.7.
~]$ ll /usr/bin/python
lrwxrwxrwx 1 root root 7 Oct 12 2022 /usr/bin/python -> python2
~]$ ll /usr/bin/python2
lrwxrwxrwx 1 root root 9 Oct 12 2022 /usr/bin/python2 -> python2.7
~]$ ll /usr/bin/python2.7
-rwxr-xr-x 1 root root 7048 May 25 2022 /usr/bin/python2.7
In this example, /usr/bin/python3 is a symbolic link to /usr/local/bin/python3.9.6/bin/python3.9.
~]$ ll /usr/bin/python3
lrwxrwxrwx 1 root root 18 Apr 13 02:55 /usr/bin/python3 -> /usr/bin/python3.9
~]$ ll /usr/bin/python3.9
lrwxrwxrwx 1 root root 40 Apr 13 02:22 /usr/bin/python3.9 -> /usr/local/bin/python3.9.6/bin/python3.9
In this scenario, if pip installed certbot in Python version 3, then the certbot CLI should be in the /usr/local/bin/python3.9.6/bin directory (it is!).
~]$ ll /usr/local/bin/python3.9.6/bin/
-rwxr-xr-x 1 root root 117 Nov 16 2023 2to3-3.9
-rwxr-xr-x 1 root root 213 Apr 13 02:56 certbot
-rwxr-xr-x 1 root root 214 Apr 13 02:56 distro
-rwxr-xr-x 1 root root 115 Nov 16 2023 idle3.9
-rwxr-xr-x 1 root root 1697 Apr 13 02:49 jp.py
-rwxr-xr-x 1 root root 213 Apr 13 02:56 jws
-rwxr-xr-x 1 root root 235 Apr 13 02:51 normalizer
-rwxr-xr-x 1 root root 223 Apr 13 02:49 pip
-rwxr-xr-x 1 root root 223 Apr 13 02:49 pip3
-rwxr-xr-x 1 root root 223 Apr 13 02:49 pip3.10
-rwxr-xr-x 1 root root 223 Apr 13 02:49 pip3.9
drwxr-xr-x 2 root root 31 Apr 13 02:49 __pycache__
-rwxr-xr-x 1 root root 100 Nov 16 2023 pydoc3.9
-rwxr-xr-x 1 root root 18606456 Nov 16 2023 python3.9
-rwxr-xr-x 1 root root 3103 Nov 16 2023 python3.9-config
-rwxr-xr-x 1 root root 208 May 5 12:02 wheel
The certbot --version command can be used to verify that the certbot command is working.
~]$ /usr/local/bin/python3.9.6/bin/certbot --version
certbot 2.10.0
Did you find this article helpful?
If so, consider buying me a coffee over at