Known python issues on MacOS

ISSUE
MacOS has python2 already installed, but not python3, so when we introduced the python3 option in Trelis 17.0, users started getting errors that they weren’t getting with Trelis 16.5, such as:

“Trelis-17.0.app/Contents/MacOS/Trelis-17.0 -nographic
ERROR: Unable to initialize Python interpreter!”

With the release of 17.1, we have fixed some python issues, but MacOS users will still have trouble using python3 in Trelis, unless they manually install python 3.8. This should only be an issue when using python3. python2 should work as expected.

FIX
Please install python3 in the CLI using homebrew (instructions for downloading homebrew at https://brew.sh/).
Make sure you have python version 3.8 installed.

RESULT
In the GUI: You should then be able to switch to python version 3 in Preferences > General in Trelis, close out or Trelis, then start it up again and python3 will be working with Trelis.
In the CLI: You should be able to run “Trelis-17.1.app/Contents/MacOS/Trelis-17.1 -pythonversion 3 -nographics” without errors

1 Like

I am using Mojave and it installs 3.8.8_1 in brew, when 3.8.3_2 is expected:

/usr/local/Cellar/python@3.8/3.8.3_2/Frameworks/Python.framework/Versions/3.8/Python (compatibility version 3.8.0, current version 3.8.0)

I am able to import from Anaconda version 3.9, using:

 export PYTHONPATH=/Applications/Coreform-Cubit-2020.2.app//Contents/MacOS
 python -m cubit

or from the python prompt:

import cubit
cubit.init("cubit")

but then software crashes:

>>> import cubit
>>> cubit.cmd('create surface rectangle width 0.095 height 0.035 xplane')

Segmentation fault: 11

actually it doesn’t crash if I do the init before cubit.cmd.