CellProfiler 3.1.8 error on Terminal with macOS

Hi,

I have installed CellProfiler 3.1.8 on my Mac with macOS 10.14.5. However I run into an error with respect to JAVA (see below).

So I do have JAVA. But still it does not work.

How can I fix this?

Best,

Sander

cellprofiler
[7191] PyInstaller Bootloader 3.x
[7191] LOADER: executable is /Applications/CellProfiler-3.1.8.app/Contents/MacOS/cp
[7191] LOADER: homepath is /Applications/CellProfiler-3.1.8.app/Contents/MacOS
[7191] LOADER: _MEIPASS2 is NULL
[7191] LOADER: archivename is /Applications/CellProfiler-3.1.8.app/Contents/MacOS/cp
[7191] LOADER: /Applications/CellProfiler-3.1.8.app/Contents/MacOS/cp contains a digital signature
[7191] LOADER: No need to extract files to run; setting extractionpath to homepath
[7191] LOADER: Already in the child - running user’s code.
[7191] LOADER: Python library: /Applications/CellProfiler-3.1.8.app/Contents/MacOS/Python
[7191] LOADER: Loaded functions from Python library.
[7191] LOADER: Manipulating environment (sys.path, sys.prefix)
[7191] LOADER: sys.prefix is /Applications/CellProfiler-3.1.8.app/Contents/MacOS
[7191] LOADER: Setting runtime options
[7191] LOADER: Initializing python
[7191] LOADER: Overriding Python’s sys.path
[7191] LOADER: Post-init sys.path is /Applications/CellProfiler-3.1.8.app/Contents/MacOS
[7191] LOADER: Setting sys.argv
[7191] LOADER: setting sys._MEIPASS
[7191] LOADER: importing modules from CArchive
[7191] LOADER: extracted struct
[7191] LOADER: callfunction returned…
[7191] LOADER: extracted pyimod01_os_path
[7191] LOADER: callfunction returned…
[7191] LOADER: extracted pyimod02_archive
[7191] LOADER: callfunction returned…
[7191] LOADER: extracted pyimod03_importers
[7191] LOADER: callfunction returned…
[7191] LOADER: Installing PYZ archive with Python modules.
[7191] LOADER: PYZ archive: out00-PYZ.pyz
[7191] LOADER: Running pyiboot01_bootstrap.py
[7191] LOADER: Running pyi_rth_traitlets.py
[7191] LOADER: Running pyi_rth_mplconfig.py
[7191] LOADER: Running pyi_rth_mpldata.py
[7191] LOADER: Running pyi_rth_pkgres.py
[7191] LOADER: Running pyi_rth_multiprocessing.py
[7191] LOADER: Running CellProfiler.py
No handlers could be found for logger “javabridge.locate”
/Applications/CellProfiler-3.1.8.app/Contents/MacOS/wx/_core.py:16633: UserWarning: wxPython/wxWidgets release number mismatch
Could not find Java JRE compatible with x86_64 architecture
Could not find Java JRE compatible with x86_64 architecture
Traceback (most recent call last):
File “javabridge/jutil.py”, line 273, in start_thread
File “javabridge/jutil.py”, line 125, in _find_mac_lib
UnboundLocalError: local variable ‘cmd’ referenced before assignment
Failed to create Java VM
Traceback (most recent call last):
File “CellProfiler.py”, line 8, in
File “cellprofiler/main.py”, line 162, in main
File “cellprofiler/gui/app.py”, line 53, in init
File “cellprofiler/utilities/cpjvm.py”, line 102, in cp_start_vm
File “javabridge/jutil.py”, line 314, in start_vm
RuntimeError: Failed to start Java VM
[7191] Failed to execute script CellProfiler
[7191] LOADER: OK.
[7191] LOADER: Cleaning up Python interpreter.

java -version
openjdk version “12.0.1” 2019-04-16
OpenJDK Runtime Environment (build 12.0.1+12)
OpenJDK 64-Bit Server VM (build 12.0.1+12, mixed mode, sharing)