The chosen Python has version <unknown>

I’ve just installed python 3.8 on macOS 10.15.1 Catalina and am trying to set up python3 in Komodo 11.1.1. When I set the Default interpreter path in the preferences, I get this message: “The chosen Python has version <unknown> . . .” When I try to run the debugger, I get "Unable to initialize the debugging system because Debugging will be unavailable until you change the debugger port in your preferences. . . . "

The log shows some complaints:
2019-11-25 18:41:49,016] [ERROR] console-logger: TypeError: tab is undefined (2) in viewbrowser:133
Traceback (most recent call last):
File “viewbrowser”, line 133, in

ERROR:xpcom:Unhandled exception calling ‘G int8 * version(out retval string);’
Traceback (most recent call last):
File “/Applications/Komodo IDE 11.app/Contents/Resources/python/xpcom/server/policy.py”, line 276, in CallMethod
ret = func(*params)
File “/Applications/Komodo IDE 11.app/Contents/Resources/components/koAppInfo.py”, line 157, in get_version
return self.getVersionForBinary(path)
File “/Applications/Komodo IDE 11.app/Contents/Resources/components/koAppInfo.py”, line 489, in getVersionForBinary
p = process.ProcessOpen(argv, cwd=cwd, env=env, stdin=None)
File “/Applications/Komodo IDE 11.app/Contents/Resources/python/xpcom/components.py”, line 268, in wrapperFn
return fn(*args, **kwargs)
File “/Applications/Komodo IDE 11.app/Contents/Resources/python/komodo/process.py”, line 328, in init
creationflags=flags)
File “/Applications/Komodo IDE 11.app/Contents/Resources/python/komodo/subprocess32.py”, line 812, in init
restore_signals, start_new_session)
File “/Applications/Komodo IDE 11.app/Contents/Resources/python/komodo/subprocess32.py”, line 1557, in _execute_child
raise child_exception_type(errno_num, err_msg)
OSError: [Errno 8] Exec format error
[2019-11-25 18:41:49,109] [ERROR] koInvokeInterpreters: Unable to find a valid Python executable
Traceback (most recent call last):
File “/Applications/Komodo IDE 11.app/Contents/Resources/components/koInvokeInterpreters.py”, line 757, in init
if pythonInfo.version:
File “/Applications/Komodo IDE 11.app/Contents/Resources/python/xpcom/client/init.py”, line 396, in getattr
return getattr(interface, attr)
File “/Applications/Komodo IDE 11.app/Contents/Resources/python/xpcom/client/init.py”, line 494, in getattr
return NS_InvokeByIndex(self.comobj, method_index, args)
Exception: 2147500037 (NS_ERROR_FAILURE)
ERROR:xpcom:Unhandled exception calling ‘int8 * invoke(in int32);’
Traceback (most recent call last):
File “/Applications/Komodo IDE 11.app/Contents/Resources/python/xpcom/server/policy.py”, line 303, in CallMethod
return 0, func(*params)
File “/Applications/Komodo IDE 11.app/Contents/Resources/components/koInvokeInterpreters.py”, line 275, in invoke
return self._launchForDebug()
File “/Applications/Komodo IDE 11.app/Contents/Resources/components/koInvokeInterpreters.py”, line 968, in _launchForDebug
return self._doLaunch(argv, cwd, env)
File “/Applications/Komodo IDE 11.app/Contents/Resources/components/koInvokeInterpreters.py”, line 414, in _doLaunch
self.process = runutils.KoTerminalProcess(argv, cwd=cwd, env=env)
File “/Applications/Komodo IDE 11.app/Contents/Resources/python/komodo/runutils.py”, line 150, in init
self._process = process.ProcessOpen(cmd, cwd=cwd, env=env)
File “/Applications/Komodo IDE 11.app/Contents/Resources/python/xpcom/components.py”, line 268, in wrapperFn
return fn(*args, **kwargs)
File “/Applications/Komodo IDE 11.app/Contents/Resources/python/komodo/process.py”, line 328, in init
creationflags=flags)
File “/Applications/Komodo IDE 11.app/Contents/Resources/python/komodo/subprocess32.py”, line 812, in init
restore_signals, start_new_session)
File “/Applications/Komodo IDE 11.app/Contents/Resources/python/komodo/subprocess32.py”, line 1557, in _execute_child
raise child_exception_type(errno_num, err_msg)
OSError: [Errno 8] Exec format error
[2019-11-25 18:41:52,617] [ERROR] ko.dbg.invocation: There was an unexpected error starting the invocation:[Exception… “Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [koIInvocation.invoke]” nsresult: “0x80004005 (NS_ERROR_FAILURE)” location: “JS frame :: chrome://komodo/content/debugger/debugger.js :: this.invocation.doExecute :: line 2391” data: no]
Traceback from ERROR in ‘ko.dbg.invocation’ logger:
Logger.prototype.error@chrome://komodo/content/sdk/logging.js:411:27
this.invocation.doExecute@chrome://komodo/content/debugger/debugger.js:2400:13
ko_dbg_invocation_doStart/onInvocationReady@chrome://komodo/content/debugger/debugger.js:2500:23
ko_dbg_invocation_getInvocation/onSessionReady@chrome://komodo/content/debugger/debugger.js:2227:13
ko_dbg_invocation_getInvocation@chrome://komodo/content/debugger/debugger.js:2231:13
ko_dbg_invocation_doStart/onSessionReady@chrome://komodo/content/debugger/debugger.js:2443:1
DBG_Manager_newSession/onTabMgrReady@chrome://komodo/content/debugger/debugger.js:382:13
outputTabManager_getTabMgr/<@chrome://komodo/content/debugger/debugSessionTab.js:1104:17
outputTabManager_createTab/<@chrome://komodo/content/debugger/debugSessionTab.js:1024:21
koWidgetManager__widgetLoadCallback@chrome://komodo/content/library/widgets.js:234:17
WidgetLoad_onStateChange@chrome://komodo/content/bindings/pane.xml:2457:15

Dave

@Dafu how did you install Python?

Disk image from Python.org. Also ran the Update shell profile command.

Dave

What’s that? Nvr heard of this.

It comes with all the mac python distributions it’s a shell program that updates the env PATH to include, in this case, python 3.8

Dave

@Dafu, excellent. Thanks for the follow ups.

What path do you set in the prefs? Does it matches what shows up when you run which python in the terminal you ran the Update shell profile command in?

  • Carey

Excellent catch Carey! I had the prefs going to the top-level python in the 3.8 directory instead of the one in the bin directory.

It works, now.

Thanks very much!

Dave

@Dafu, OSX language install paths are confusing at the best of times!

Glad we could get you sorted.

  • Carey