Failure to install python packages with letsencrypt

I’ve been getting the following error when I try to issue or renew the certificate using letsencrypt. I’m running NC on a RaspberryPi with Raspbian 9. Here’s my output:

Running letsencrypt
Bootstrapping dependencies for Debian-based OSes… (you can skip this with --no-bootstrap)
(…)
Reading package lists…
Reading package lists…
Building dependency tree…
Reading state information…
augeas-lenses is already the newest version (1.8.0-1+deb9u1).
ca-certificates is already the newest version (20161130+nmu1+deb9u1).
libaugeas0 is already the newest version (1.8.0-1+deb9u1).
libffi-dev is already the newest version (3.2.1-6).
python-virtualenv is already the newest version (15.1.0+ds-1).
virtualenv is already the newest version (15.1.0+ds-1).
libssl-dev is already the newest version (1.1.1a-2~20190131152537.8+stretch).
openssl is already the newest version (1.1.1a-2~20190131152537.8+stretch).
python-dev is already the newest version (2.7.15-3).
gcc is already the newest version (4:8.1.0-1+rpi1).
python is already the newest version (2.7.15-3).
0 upgraded, 0 newly installed, 0 to remove and 25 not upgraded.
Creating virtual environment…
Installing Python packages…
Traceback (most recent call last):
File “/tmp/tmp.DU7w1srXeK/pipstrap.py”, line 177, in
exit(main())
File “/tmp/tmp.DU7w1srXeK/pipstrap.py”, line 158, in main
for path, digest in PACKAGES]
File “/tmp/tmp.DU7w1srXeK/pipstrap.py”, line 118, in hashed_download
response = opener(using_https=parsed_url.scheme == ‘https’).open(url)
File “/usr/lib/python2.7/urllib2.py”, line 429, in open
response = self._open(req, data)
File “/usr/lib/python2.7/urllib2.py”, line 447, in _open
‘_open’, req)
File “/usr/lib/python2.7/urllib2.py”, line 407, in _call_chain
result = func(*args)
File “/usr/lib/python2.7/urllib2.py”, line 1241, in https_open
context=self._context)
File “/usr/lib/python2.7/urllib2.py”, line 1198, in do_open
raise URLError(err)
urllib2.URLError: <urlopen error [Errno 104] Connection reset by peer>
Done. Press any key…

Thinks have been running just fine for a few months, but somehow it got broken recently. Not sure if it happend before or after I upgraded from ncp 0.6.x to 1.5.1…

Thanks