MCPcopy Index your code
hub / github.com/deepnote/deepnote / isPythonAvailable

Function isPythonAvailable

packages/runtime-core/src/python-env.ts:136–143  ·  view source on GitHub ↗

* Checks if a Python command is available on the system.

(command: string)

Source from the content-addressed store, hash-verified

134 * Checks if a Python command is available on the system.
135 */
136function isPythonAvailable(command: string): boolean {
137 try {
138 execSync(`${command} --version`, { stdio: 'ignore' })
139 return true
140 } catch {
141 return false
142 }
143}
144
145/**
146 * Detects the virtual environment root for a given Python executable path.

Callers 1

detectDefaultPythonFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected