Change the python version of installed plone

Hello,
Plone 5.1.5 can work with python 3.
Or Plone 5.1.5 installs and works with Python version 2.7.16 on Windows.
How to change this and tell Plone to work with Python 3.7.3 installed
on the "D" partition of my system?
Thanks in advance .

Adomy via Plone Community wrote at 2019-10-25 20:03 +0000:

Plone 5.1.5 can work with python 3.
Or Plone 5.1.5 installs and works with Python version 2.7.16 on Windows.
How to change this and tell Plone to work with Python 3.7.3 installed

As far as I know, Plone 5.1 cannot work with Python 3; that's supported
only from Plone 5.2 on.

Apparently, you are working under Windows. I cannot say much about
this platform. The "universal installer" (typically used for *nix
platform) allows to specify the python executable to be used
for the installation. Maybe, the Windows installer allows this as well.

Only Plone 5.2 works with Python 3.
Other versions do not.

Hello,
Thank you for your answer and your clarifications.
Now I am well informed on the subject.
I asked the question about plone 5.1.5 and python 3.7 because often by installing packages
python for plone 5.1.5, I receive messages indicating that python 2.7 is soon deprecated and that it will not be supported anymore from January 1st.
Beyond that, can someone tell me nevertheless how I can tell plone 5.1.5 to use instead the version of python 2.7.16 that I installed in place of the python 2.7.16
which got installed in the folder "Plone" during the installation
from "UnifiedInstaller".
Indeed, I noticed when I install python packages for plone, these programs are installed by default under the version of python that I installed. And since plone does not point to this version, it ignores these packages installed under python.
Thank you in advance for your help.

Adomy via Plone Community wrote at 2019-10-26 14:07 +0000:

...
Beyond that, can someone tell me nevertheless how I can tell plone 5.1.5 to use instead the version of python 2.7.16 that I installed in place of the python 2.7.16
which got installed in the folder "Plone" during the installation
from "UnifiedInstaller".

The "UnifiedInstaller" has an option to tell it which
Python (program) it should use for the installation.
Thus, install the Python version you want and then tell
the "UnifiedInstaller" to use this Python.

Note that "UnifiedInstaller" uses this Python to build a so
called "virtual environment". Motivation: partially isolate
the environment used for Plone from the (usual) global Python environment
(to avoid problems regarding different version requirements).
Thus, Plone will typically not see packages you install
into the original Python environment.

Of course, you cannot use a Python version not supported by your Plone
version. E.g. you cannot use Python 3 with Plone before 5.2.

Hello,
Thank you for your explanations.
This probably explains why when I install.plugins.ldap via buildout, it
literally breaks the installation of plone 5.1.5 by emptying the folder "parts".
As not.plugins.ldap depends on python-ladap, on Windows, it is advisable to use
the packages of this site: https://www.lfd.uci.edu/~gohlke/pythonlibs/#jpype
I installed via pip: »pip install C: /some-dir/some-file.whl»

But before, it is advisable to install the numpy + mkl dependency before python_ldap.
The problem is that all this was installed by default under "C: \ Python27" that I had installed on my system before plone 5.1.5, instead of settling in
"C: \ Users \ Adminx \ Plone \ Python-2.7"
result after installing pas.plugins.ldap in buildout.cfg,
I run bin / buildout, I have an error and the "parts" folder is empty.
You can no longer access plone (ZMI).
My question: how to use pip, install numpy + mkl and python_ldap
under "C: \ Users \ AdminX \ Plone \ Python-2.7" instead of "C: \ Python27".
Thanks in advance.

Adomy via Plone Community wrote at 2019-10-26 17:12 +0000:

This probably explains why when I install.plugins.ldap via buildout, it
literally breaks the installation of plone 5.1.5 by emptying the folder "parts".

This should not happen -- if buildout finished successfully.

"Part"s construction is controlled by so called
"recipe"s. Some recipes delete then create. For those, the corresponding
directory below "parts" may be missing if buildout does not
run successfully.

Has your buildout run caused problem messages?

...
I installed via pip: »pip install C: /some-dir/some-file.whl»

The "virtual env" contructed by the "UnifiedInstaller has its own
"pip". If you use this one, then the installation is into
the virtual environment.

Plone Foundation Code of Conduct