OK so what I think is happening here is that in some cases when Let’s Encrypt is setup on an existing server that may have some old Python configuration, the install is placing the packages for the virtual environment in
/root/.local/share/letsencrypt/local/lib/python2.7/dist-packages
On new servers it’s being installed to:
/root/.local/share/letsencrypt/local/lib/python2.7/site-packages/
That being said, the underlying cause is that the Python path when running either versions does not include the lib64/dist-packages directory. On the existing server where things are getting installed to dist-packages I see the non lib64 dist packages folder as part of the path, but not the lib64 version.
On the FRESH server, the OpenSSL dependency is placed in lib64 site-packages (directory of command prompt is /root/.local/share/letsencrypt):
[root letsencrypt]# find ./ -type d | grep -i openssl
./lib64/python2.7/site-packages/OpenSSL
And here are the python path values:
[’/root/.local/share/letsencrypt/bin’
’/root/.local/share/letsencrypt/local/lib64/python2.7/site-packages’
’/root/.local/share/letsencrypt/local/lib/python2.7/site-packages’
’/root/.local/share/letsencrypt/lib64/python2.7’
’/root/.local/share/letsencrypt/lib/python2.7’
’/root/.local/share/letsencrypt/lib64/python2.7/site-packages’
’/root/.local/share/letsencrypt/lib/python2.7/site-packages’
’/root/.local/share/letsencrypt/lib64/python2.7/lib-dynload’
’/usr/lib64/python2.7’
’/usr/lib/python2.7’]
So OpenSSL is found.
On an EXISTING server, however, the OpenSSL dependency is placed in lib64 dist-packages (directory of command prompt is /root/.local/share/letsencrypt):
[root letsencrypt]# find ./ -type d | grep -i openssl
./lib64/python2.7/dist-packages/OpenSSL
However, the python paths:
[’/root/.local/share/letsencrypt/bin’
’/root/.local/share/letsencrypt/local/lib64/python2.7/site-packages’
’/root/.local/share/letsencrypt/local/lib/python2.7/site-packages’
’/root/.local/share/letsencrypt/lib64/python2.7’
’/root/.local/share/letsencrypt/lib/python2.7’
’/root/.local/share/letsencrypt/lib64/python2.7/site-packages’
’/root/.local/share/letsencrypt/lib/python2.7/site-packages’
’/root/.local/share/letsencrypt/lib64/python2.7/lib-dynload’
’/root/.local/share/letsencrypt/local/lib/python2.7/dist-packages’
’/root/.local/share/letsencrypt/local/lib/python2.7/dist-packages’
’/root/.local/share/letsencrypt/lib/python2.7/dist-packages’
’/usr/lib64/python2.7’
’/usr/lib/python2.7’]
do not contain lib64/python2.7/dist-packages so the module is not found.
Is there some way to force the installation to the correct directories and/or to fix the python path used to include lib64/python2.7/dist-packages?
This is the root of our issue on EC2.