Certbot has problem setting up the virtual environment

I found already a lot of other threads about exact that problem here. But none of the solutions helped me.
I did a “apt-get upgrade” and a “apt-get update”. I rebooted my server. I updated pip2 and pip3. I created a swap file like it was described here (https://certbot.eff.org/docs/install.html#problems-with-python-virtual-environment). No change. I still get this error.

"Certbot has problem setting up the virtual environment.

We were not be able to guess the right solution from your pip
output.

Consult https://certbot.eff.org/docs/install.html#problems-with-python-virtual-environment
for possible solutions.
You may also find some support resources at https://certbot.eff.org/support/ ."

What should I do?

Possibly take the time to file a proper bug report including the system version, for a start.
Then if you can, report about the result of entering at the console

virtualenv

does it return an usage message or a command not found like message ?

1 Like

When I run “virtualenv” I get this output:

Running virtualenv with interpreter /usr/bin/python2
You must provide a DEST_DIR
Usage: virtualenv.py [OPTIONS] DEST_DIR

Options:

And then all the options listed.
When I run “uname -srm” I get this information about my system version.

Linux 4.14.98-v7+ armv7l

I’m running the server on a Raspberry Pi 3+, operating system is Raspbian Stretch what is based on Debian Stretch.

A Pi3+ should have enough memory to setup a virtual env, so what could happen…
Try to enter:

certbot --install-only -v
or
certbot-auto --install-only -v (if you use certbot-auto)

and paste the output (well if it don’t succeed…) on this forum
FIY if you don’t know this forum software - Discourse -, use 3 backticks (`̀``) on a separate line to trigger the text mode else your paste will probably look horribly garbled.

Collecting certbot-nginx==0.34.2 (from -r /tmp/tmp.qVCwmzIW9u/letsencrypt-auto-requirements.txt (line 213))
Downloading https://files.pythonhosted.org/packages/f5/2a/dd77fabc1d7e58eb8c17e1ef72bf497b911116fe086845ab6b9dc6c9379d/certbot_nginx-0.34.2-py2.py3-none-any.whl (86kB)
Requirement already satisfied: setuptools>=1.0 in /opt/eff.org/certbot/venv/lib/python2.7/site-packages (from josepy==1.1.0->-r /tmp/tmp.sE7vB0D49R/letsencrypt-auto-requirements.txt (line 87))
THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them.
    pycparser==2.19 from https://www.piwheels.org/simple/pycparser/pycparser-2.19-py2.py3-none-any.whl#sha256=344870c533812cb119c5475b5aed033ec546118711338ff9b2b78e67098d64e7 (from -r /tmp/tmp.sE7vB0D49R/letsencrypt-auto-requirements.txt (line 105)):
        Expected sha256 a988718abfad80b6b157acce7bf130a30876d27603738ac39f140993246b25b3
             Got        344870c533812cb119c5475b5aed033ec546118711338ff9b2b78e67098d64e7

Had a problem while installing Python packages.

This is what I get in the end. I don’t know how to update the hashes. Is there a command for that? I didn’t change anything. Btw, I’m using the command “letsencrypt-auto” not “certbot-auto”. I don’t know if this is important.
Thanks so much for your fast replies :slight_smile:

Now I’m lost what I should do. Updating hashes sounds for me to complicated. Isn’t there a better solution? Like a patch for certbot that can live with files from another source? I think it’s a problem with certbot/letsencrypt. Since I’m working on a total standard operation system on a total standard hardware.

Hi @Mirko

there are a lot of threads with that problem.

Please check

It seems that I missed one of your reply, sorry to have let you waiting.
@JuergenAuer is right, it seems that your system is not as standard as you think, now that I remember it, Raspberry distros have sometimes special characteristics because of the Arm architecture.
pip search --help
should give you https://pypi.python.org/pypi in the search options section
If not you may have problems running certbot-auto (or letsencrypt-auto, that’s pretty much the same thing)

OK, I found the solution. First of all, thank you so much for your time and help. I felt taken care of :slight_smile:
The problem was pip. I had to delete the pip.conf (/etc/pip.conf) and then everything worked perfect :smiley:.

1 Like

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