# Installing certbot on systems running outdated versions of Python

**URL:** <https://community.letsencrypt.org/t/installing-certbot-on-systems-running-outdated-versions-of-python/92041>\
**Category:** Help\
**Created:** [April 24, 2019, 9:06pm UTC](https://community.letsencrypt.org/t/installing-certbot-on-systems-running-outdated-versions-of-python/92041 "2019-04-24T21:06:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![amotl](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/amotl/32/31442_2.png) [@amotl](https://community.letsencrypt.org/u/amotl)\
**Post date:** [April 24, 2019, 9:06pm UTC](https://community.letsencrypt.org/t/installing-certbot-on-systems-running-outdated-versions-of-python/92041/1 "2019-04-24T21:06:01Z")

</div>

Hi there,

first things first: Thank you so much for conceiving and maintaining Let’s Encrypt and `certbot` . We would not be able to live without both of these fine tools these days.

## Introduction

Coming from [PIP error with certbot-auto](https://community.letsencrypt.org/t/pip-error-with-certbot-auto/88200), we figure a growing amount of users are faced with problems revolving not being able to install or run `certbot` on outdated systems like Debian 7.11 not providing a reasonable modern version of Python. We learned that `certbot` currently has a minimum requirement of Python 3.4.2.

We found a solution which is both solid and sustainable by using [pyenv](https://github.com/pyenv/pyenv), which will give you arbitrary Python environments like [RVM](https://rvm.io/) for Ruby or [nodeenv](https://pypi.org/project/nodeenv/) for Node.js and is similar delightful to use. Installing software this way makes it completely decoupled from the installation of your system distribution which we consider a good thing for these kinds of use-cases.

## Install `pyenv`

By using [pyenv](https://github.com/pyenv/pyenv), we will install Python 3.4.2 as a minimum requirement of `certbot` on the system in a non-invasive way and then `certbot` itself along with some of its plugins.

> **Detailed installation instructions for pyenv.**
>
> ```bash
> # Counter "/tmp" being mounted noexec
> export TMPDIR=/var/tmp
> 
> # Install pyenv
> curl -L https://raw.githubusercontent.com/pyenv/pyenv-installer/master/bin/pyenv-installer | bash
> 
> ```
> 
> This gives further instructions about how to actually activate the software.
> 
> ```bash
> # Load pyenv automatically by adding
> # the following to ~/.bashrc:
> 
> export PATH="/root/.pyenv/bin:$PATH"
> eval "$(pyenv init -)"
> eval "$(pyenv virtualenv-init -)"
> 
> ```

## Install Python 3.4.2

```bash
pyenv install 3.4.2

```

## Install `certbot`

```bash
# Run the following commands with the designated Python version
export PYENV_VERSION=3.4.2

# Upgrade setuptools
pip install setuptools --upgrade

# Install certbot
pip install certbot requests requests-toolbelt pbr

# Optionally, install plugins
pip install certbot-apache

```

## Activate `certbot` system-wide

Without further ado, you might want to provide the `certbot` command of this installation to the whole system after removing any other - probably defunct - versions of `certbot` beforehand.

```bash
ln -s /root/.pyenv/versions/3.4.2/bin/certbot /usr/local/bin/certbot

```

## Voilà

You are now running a contemporary version of `certbot`, even on an older system than `certbot` would originally be possible to run on.

```auto
$ certbot --version
certbot 0.33.1

```

We hope this might help the one or another wrestling with these kinds of problems.

With kind regards,  
Andreas.

* * *

P.S.: This guideline should definitively work with more recent versions of Python either. However, we just wanted to demonstrate here that **`certbot` currently requires Python 3.4 at least** and that this actually **does** work.

P.P.S.: @auspex1: Thank you so much for your suggestions on this through [PIP error with certbot-auto](https://community.letsencrypt.org/t/pip-error-with-certbot-auto/88200/20).

---

<div class="post-metadata">

**Author:** ![quanah](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/quanah/32/19485_2.png) [@quanah](https://community.letsencrypt.org/u/quanah)\
**Post date:** [May 18, 2019, 7:11pm UTC](https://community.letsencrypt.org/t/installing-certbot-on-systems-running-outdated-versions-of-python/92041/2 "2019-05-18T19:11:46Z")

</div>

Note: Necessary to stop using certbot-auto after these changes, as it will still load the old environment.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/letsencrypt/original/3X/c/a/ca6c06ea1ea201324bba7048c6841ce60236468d.png) [@system](https://community.letsencrypt.org/u/system)\
**Post date:** [June 17, 2019, 7:11pm UTC](https://community.letsencrypt.org/t/installing-certbot-on-systems-running-outdated-versions-of-python/92041/3 "2019-06-17T19:11:51Z")

</div>

Closed on June 17, 2019, 7:11pm UTC

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