studio
studio copied to clipboard
EEZ flow python: Python different places/compatibility (OS X M1)
Python stuff is really interesting. If I want to run the demo on mac with M1 then I need to start python with 'arch -arm64 /
Currently it is possible to set the executable/path per python component. This makes the flows very system and flow dependent.
Would like to suggest to add the following variables: System.ProjectPythonPath System.GlobalPythonPath
Where the default python path of a component will be:
- System.ProjectPythonPath if set;
- otherwise System.GlobalPythonPath
- otherwise search the PATH
In case of OS X M1: add a checkmark to let the user choose to run python as arm64.
To support more complex python environment with libraries it would be nice to create support for running in a venv with a defined set of libraries on a per project basis. This would greatly enhance the portability of flows using python.
My current workaround:
In flow:
Script (using python from python.org):
#!/bin/sh
arch -arm64 /Library/Frameworks/Python.framework/Versions/3.10/bin/python3 $1