__future__ import print_function in plesk extension 1.9.3 not supported?


hello, just noticed that on my plesk 12.5.30 runnin on centos-release-6-8.el6.centos.12.3.x86_64, trying to issue a certificate on a domain via the let’s encrypt extension that once worked fine, now refers the following:

Errore: Installazione del certificato SSL
Let's Encrypt non riuscita: Failed letsencrypt execution: Could not find
platform dependent libraries <exec_prefix>

Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Traceback (most recent call last):
File "/usr/local/psa/var/modules/letsencrypt/venv/bin/certbot", line 7, in <module>
from certbot.main import main
line 2, in <module>
from __future__ import print_function

ImportError: No module named __future__

Already tried
this solution -> http://unix.stackexchange.com/questions/303702/cant-start-gns3-due-to-python-issues/303748
and this solution -> https://talk.plesk.com/threads/letss-encrypt-issue.340537/
without any luck

The extension was originally installed via plesk extension installer, since I want to avoid any extra mess installing from external repos or sources to maximize stability.

If I understand correctly, the plesk extension includes a python2.7 copy, is it possible that this pack lacks the support for the required module it refers to?

thanks anyone for any possible help


hi @funkoolow

not sure how tight your change control is but it’s looking like python is broken

can you run from the command prompt

python --version

and let us know what the outcome is

having a look at the leinstaller file it’s a bash script

i can see it’s relying on python being available but don’t believe it installs it for you

also the files are all PHP wrappers for the certbot client



unfortunately parallels also obfuscates their PHP code (which is fine) so it can be quite hard to figure out errors however i don’t believe the issue is with PHP code rather a broken python on your system :smiley:


the python actually available seems to be 2.6.6
# python --version
Python 2.6.6
and it’s available here:
# whereis python
python: /usr/bin/python2.6 /usr/bin/python /usr/bin/python2.6-config /usr/lib/python2.6 /usr/lib64/python2.6 /usr/include/python2.6 /usr/share/man/man1/python.1.gz

so the questions are:

  1. the extension need 2.7 or also 2.6 is ok? cause if it’s ok 2.6, probably it’s true that python setup is not working well
  2. why I also have what seems to be a 2.7 pack under
    Do I need to configure the script telling it to use that specific pack?

thanks again


hi @funkoolow

i do believe it should by python 2.7

can you check under /opt/plesk/python/2.7/bin/ and see if there is any python there ?

if so i would suggest making that the PYTHONPATH



I can confirm python 2.7 exactly there, tried to set the path via export:

# export PYTHONPATH=/opt/plesk/python/2.7/bin:/opt/plesk/python/2.7/lib:/opt/plesk/python/2.7/lib64

# export -p | grep PYTHONPATH
declare -x PYTHONPATH="/opt/plesk/python/2.7/bin:/opt/plesk/python/2.7/lib:/opt/plesk/python/2.7/lib64"

but still report the same error, can you please refer the correct way to set it?


hi @funkoolow

do you know anyone at parallels?

I don’t have a test system and it’s getting to that stage where I don’t want to give advice that may break your system

In a working install (mine is windows based) if you run pip freeze you should be able to see all the packages

another way to test this is below

import future

if this does not cause any issues then your dependencies are ok



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