[How To] Update Python and installing Let's Encrypt Client on Debian 6 "Squeeze"


#1

Hello,

This is a “copy/paste style” How To update Python and then install the LetsEncrypt Client on Debian 6 “Squeeze”

Install some dependencies:

apt-get install build-essential python-pip git libssl-dev libffi-dev python-dev
pip install pythonbrew
pythonbrew_install
source "$HOME/.pythonbrew/etc/bashrc"

Updating Python to version 2.7.10 :

pythonbrew install 2.7.10
pythonbrew switch 2.7.10
pythonbrew use 2.7.10

Installing some Python dependencies:

pip install virtualenv
pip install pyopenssl ndg-httpsclient pyasn1
pip install cryptography

Installing LetsEncrypt Client:

git clone https://github.com/letsencrypt/letsencrypt
cd letsencrypt
./letsencrypt-auto

You are done !


#2

The procedure seems to work fine except for an error during the “pythonbrew install 2.7.10” part:
Installing distribute into /root/.pythonbrew/pythons/Python-2.7.10
ERROR: Failed to install setuptools. See /root/.pythonbrew/log/build.log to see why.
Skip installation of setuptools.

However, once installed, the letsencrypt-auto command hangs for several minutes. The logs (before stopping the script execution with CTRL-C) have this to say:

2016-10-23 17:28:42,695:DEBUG:certbot.main:Root logging level set at 20
2016-10-23 17:28:42,697:INFO:certbot.main:Saving debug log to /var/log/letsencrypt/letsencrypt.log
2016-10-23 17:28:42,706:DEBUG:certbot.main:certbot version: 0.9.3
2016-10-23 17:28:42,706:DEBUG:certbot.main:Arguments: []
2016-10-23 17:28:42,707:DEBUG:certbot.main:Discovered plugins:   PluginsRegistry(PluginEntryPoint#nginx,PluginEntryPoint#standalone,PluginEntryPoint#manual,PluginEntryPoint#webroot,PluginEntryPoint#apache,PluginEntryPoint#null)
2016-10-23 17:28:42,713:DEBUG:certbot.plugins.selection:Requested authenticator None and installer None

I don’t think there’s anything really special about my Debian Squeeze setup in respect of vhosts (they’re all in /etc/apache2/sites-available/) and I don’t need a special Python config apart from Letsencrypt, so I’m not sure what this might be due to.
I have installed certbot in the past and uninstalled it because it was failing (differently but I don’t remember the details).


#3

Hi @ywarnier, try this Patch, works for me!


#4

problem:
`source “$HOME/.pythonbrew/etc/bashrc”

Updating Python to version 2.7.10 :

pythonbrew install 2.7.10
pythonbrew switch 2.7.10
pythonbrew use 2.7.10`

Executing: pip install virtualenv now results in:
Traceback File /usr/bin/pip, line 7, in from pip.log import logger ImportError: No module named pip.log

Because python is now running 2.7.10, and the pip in /usr/bin is set+configured for 2.6. The cause of the issue is that it is not actually pulling down the pip in 2.7 because someone commented off the line to execute ensurepip!

execute commands:
cd .pythonbrew/pythons/Python-2.7.10/lib/python2.7/ensurepip python __main__.py cd ~ pythonbrew switch 2.7.10 pythonbrew use 2.7.10

now try pip --version and make sure it is `pip 6.1.1 from ~/.pythonbrew/pythons/Python-2.7.10/lib/python2.7/site-packages

when you run pip install, it will warn you that you are using version 6, when version 9 is available! Just ignore this, version 6 is the latest release for python 2.7


#5

@ppostma1
Great! That worked for me.
Thank you.