studio icon indicating copy to clipboard operation
studio copied to clipboard

EEZ flow python: Python different places/compatibility (OS X M1)

Open fietser28 opened this issue 2 years ago • 0 comments

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 //python $1' in a separate script and set this script as python path (see example below). EEZ Studio packages are x64 and (in my case) pip only installs the arm64 packages causing loader error when a package is run.

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:

  1. System.ProjectPythonPath if set;
  2. otherwise System.GlobalPythonPath
  3. 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: image

Script (using python from python.org): #!/bin/sh arch -arm64 /Library/Frameworks/Python.framework/Versions/3.10/bin/python3 $1

fietser28 avatar Aug 22 '22 09:08 fietser28