Installing and running Python 3.7



I would like to install the latest Python version (3.7.3), to create a virtual environment with some libraries and run custom code.

This should be possible, my question is will this interfere with any of the Autopi’s processes?
My idea is to isolate it using a virtual environment, so in principle it should not alter any of the already installed Python’s: /usr/bin/python2.7 and /usr/bin/python3.5.

Running Python using the “Custom Code” section of seems to call Python 2.7, but activating the virtual environment with Python 3.7 and running a custom script is possible in principle (I did a quick test). Any foreseen problems?

Many thanks in advance,

1 Like

Hi iipr

That is really hard to say, but as you already mention, if it does not modify the python directory, then it should be fine.
I can’t say if activating the python37 environment from inside the python 2.7 custom code module, will do anything to the process. If you run some more tests, feel free to keep us in the loop, it sounds really interesting.

If all else fails, then you could always ‘wrap’ it by having it execute your external python 3.7 script from the code module - but that way you need to push your script ‘unmanaged’ to the device via SSH instead.

Best regards