Designer failing to launch on MacOS

I am trying to test a minimal UI file, and when I try to open it with Designer, it fails to launch. I launched the Designer from a terminal window and getting this error about missing encodings module. THis is r33743 (preview from July 8th).

Last login: Fri Jul 25 14:27:38 on ttys004

The default interactive shell is now zsh.
To update your account to use zsh, please run `chsh -s /bin/zsh`.
For more details, please visit https://support.apple.com/kb/HT208050.
/Users/amaga/Desktop/Slicer.app/Contents/bin/Designer.app/Contents/MacOS/Designer ; exit;
MLSSC40183:~ amaga$ /Users/amaga/Desktop/Slicer.app/Contents/bin/Designer.app/Contents/MacOS/Designer ; exit;
Designer: The class attribute for the class qSlicerDiffusionTensorVolumeDisplayWidgetPlugin does not match the class name qSlicerDiffusionTensorVolumeDisplayWidget.
QMetaProperty::read: Unable to handle unregistered datatype 'ctkDICOMTableManager*' for property 'ctkDICOMQueryRetrieveWidget::dicomTableManager'
QMetaProperty::read: Unable to handle unregistered datatype 'QTableView*' for property 'ctkDICOMTableView::tblDicomDatabaseView'
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Python path configuration:
  PYTHONHOME = (not set)
  PYTHONPATH = (not set)
  program name = 'PythonQt'
  isolated = 0
  environment = 1
  user site = 1
  safe_path = 0
  import site = 0
  is in build tree = 0
  stdlib dir = '/Users/svc-dashboard/D/P/A/python-install/lib/python3.12'
  sys._base_executable = '/Users/amaga/Desktop/Slicer.app/Contents/bin/Designer.app/Contents/MacOS/Designer'
  sys.base_prefix = '/Users/svc-dashboard/D/P/A/python-install'
  sys.base_exec_prefix = '/Users/svc-dashboard/D/P/A/python-install'
  sys.platlibdir = 'lib'
  sys.executable = '/Users/amaga/Desktop/Slicer.app/Contents/bin/Designer.app/Contents/MacOS/Designer'
  sys.prefix = '/Users/svc-dashboard/D/P/A/python-install'
  sys.exec_prefix = '/Users/svc-dashboard/D/P/A/python-install'
  sys.path = [
    '/Users/svc-dashboard/D/P/A/python-install/lib/python312.zip',
    '/Users/svc-dashboard/D/P/A/python-install',
    '/Users/svc-dashboard/D/P/A/python-install/lib-dynload',
    '/Users/svc-dashboard/D/P/A/python-install/plat-darwin',
    '/Users/svc-dashboard/D/P/A/python-install/lib/python3.12',
    '/Users/svc-dashboard/D/P/A/python-install/lib/python3.12/lib-dynload',
    '/Users/svc-dashboard/D/P/A/python-install/lib-tk',
    '/Users/svc-dashboard/D/P/A/python-install/lib/python3.12',
    '/Users/svc-dashboard/D/P/A/python-install/lib/python3.12/lib-dynload',
  ]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'

Current thread 0x0000000202f52200 (most recent call first):
  <no Python frame>
logout

Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
Deleting expired sessions...6 completed.

This is my first time with Designer, so some pointers would be great.

Some error pops up with 5.8.1 as well.

You seem to

  • enter a new shell
  • run a Designer app provided by Slicer with success (it starts)
  • run Designer without being in Slicer’s environment
  • exit immediately from the shell.

Try this:

/path/to/Slicer --launch /path/to/Designer

It always works on Linux.

1 Like

Thanks.

I also figured there is a SlicerDesigner executable, which seems to work. For whatever reason on my Mac Designer executable located at /Users/amaga/Desktop/Slicer.app/Contents/bin/Designer.app/Contents/MacOS/Designer is registered as the default application to open .ui files…

I wasn’t able to change the default application for that. So now I am opening it from the terminal window.

Great, it works, using whatever launch approach.

One thing that puzzles me on Mac, and that’s diverting from this thread’s subject:
How will Slicer handle the post-Rosetta Mac in 2027?

It seems for now the lack of Qt5 is a problem on Mac Silicon. There is a recently updated effort to switch to Qt6. I vaguely understood there were licensing issues regarding Qt6. Is there Qt6 out of the box on Mac Silicon?

Apple has dropped Motorola CPUs, then x86_64, and its current M3 (ARMv8.6-A) CPU seems to be still an aarch64 one. But aarch64 seems to be an option for Armv8-R according to wikipedia, and one can bet Apple will drop the aarch64 option in its ARMv8/v9 CPUs in a few years. Is supporting Apple a viable obligation in the long run? My point is that developers will have to dance many tunes as orchestrated by that company, and it won’t fund the promised troubles.

As for building for aarch64 out of the Mac realm, it just works and Slicer is fully functional.