I’m new to Python4Capella and trying to set-up the python interpreters. I’m using mac os 13.4 and I have python installed via miniconda
When I go to “Preferences”>“PyDev”>“Interpreters”>“Python interpreter” then select “New”>“Choose from Conda” nothing happens.
I tried “Config Conda” and selected the Conda executable in a virtual env, i.e. “/Users/ea/miniconda3/envs/capylla/bin/python3.10” but still when I select “New”>“Choose from Conda” nothing happens.
It seems that you did not select the expected conda executable.
In you case, it should be: /Users/ea/miniconda3/bin/conda, then conda will locate its Python interpreter.
Regards
With macOS 13.5, Capella 6.1, Python4Capella add-on installed.
Python 3.11.4 installed with Homebrew 4.1.4
To have Python for Capella working, I followed the following steps:
Python location set to the the same Python than PyDev (same command name from PATH, or absolute location of the same interpreter from previous section)
Then fall back to default Python4Capella configuration steps to have Python4Capella project in script locations.
Python 3.11.3 installed with Conda
Miniconda3 py311_23.5.2-0
conda list
...
python 3.11.4 hb885b13_0
python.app 3 py311h80987f9_0
...
To have Python for Capella working, I followed the following steps:
I browsed to select the python3 file located in /Users/userLogin/miniconda3/bin/python3 (symbolic link, after validation I see /Users/userLogin/miniconda3/bin/python3.11 in the Python location)
Python from path
I I redo the whole configuration with New… > Config first in PATH in Python interpreters preference page and python in Python scripting page, it also works but this time it takes python from the System / Xcode installation:
Python version: 3.9.6 (default, May 7 2023, 23:32:44)
Executable path: /Applications/Xcode.app/Contents/Developer/usr/bin/python3
Addition to sample script
I have added the following snippet to the List_logical_functions_in_console.py sample script to check which Python version was executed when running the “List logical functions in console” menu from contextual menu of a Capella element displayed in Project Explorer view: