ERPNext.com Frappe Cloud Support Partners Foundation

Lets encrypt setup failure on ERPnext v12 - Ubuntu 18.04

Hi, after bench update, on running

bench config dns_multitenant on

/home/frappe/frappe-bench# sudo -H bench setup lets-encrypt [site-name]
.
.
.
.

Setting up libssl-dev:amd64 (1.1.1-1ubuntu2.1~18.04.6) ...
Setting up python3-virtualenv (15.1.0+ds-1.1) ...
Setting up libpython2.7:amd64 (2.7.17-1~18.04ubuntu1.1) ...
Setting up augeas-lenses (1.10.1-2) ...
Setting up python-virtualenv (15.1.0+ds-1.1) ...
Setting up libpython2.7-dev:amd64 (2.7.17-1~18.04ubuntu1.1) ...
Setting up virtualenv (15.1.0+ds-1.1) ...
Setting up python2.7-dev (2.7.17-1~18.04ubuntu1.1) ...
Setting up libpython-dev:amd64 (2.7.15~rc1-1) ...
Setting up python-dev (2.7.15~rc1-1) ...
Setting up libaugeas0:amd64 (1.10.1-2) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for libc-bin (2.27-3ubuntu1.2) ...
Creating virtual environment...
usage: virtualenv [--version] [--with-traceback] [-v | -q] [--app-data APP_DATA] [--reset-app-data] [--upgrade-embed-wheels] [--discovery {builtin}] [-p py] [--creator {builtin,cpython2-posix}] [--seeder {app-data,pip}] [--no-seed]
                  [--activators comma_sep_list] [--clear] [--system-site-packages] [--symlinks | --copies] [--no-download | --download] [--extra-search-dir d [d ...]] [--pip version] [--setuptools version] [--wheel version] [--no-pip]
                  [--no-setuptools] [--no-wheel] [--no-periodic-update] [--symlink-app-data] [--prompt prompt] [-h]
                  dest
virtualenv: error: unrecognized arguments: --no-site-packages
Traceback (most recent call last):
  File "<stdin>", line 27, in <module>
  File "<stdin>", line 19, in create_venv
  File "/usr/lib/python2.7/subprocess.py", line 190, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['virtualenv', '--no-site-packages', '--python', '/usr/bin/python2.7', '/opt/eff.org/certbot/venv']' returned non-zero exit status 2

Hi, please confirm you replaced [site-name] with the name of the site on your bench

Yes, I have replaced with exact site.

“–no-site-packages” was removed from python virtual env on version 20.0.0.

Easy way to resolve it is:

sudo nano /opt/certbot-auto

now you need to find “–no-site-packages” and REMOVE it.

you can see a example in orange:
image

my actual file without “–no-site-packages” :

image

2 Likes

@PHF This worked for me.

Can u please mark the post that solved your problem as “solution”?

Yeah, I wanted to do the same but somehow that button is not appearing. Can you check ?

Strange. It should be on the bottom of any post and clickable only by the Topic owner. I can see it on my own Topics, so it hasn’t disappeared entirely

See there is no option to mark as solved.

Weird.