MCPcopy Create free account
hub / github.com/NatLabRockies/SAM / InstallPython

Method InstallPython

src/main.cpp:2739–2759  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2737}
2738
2739void SamApp::InstallPython() {
2740 if (pythonConfig.pythonVersion.empty() && pythonConfig.minicondaVersion.empty())
2741 LoadPythonConfig();
2742
2743 auto python_path = GetPythonConfigPath();
2744 // already installed and correctly configured
2745 if (CheckPythonInstalled(pythonConfig)){
2746 set_python_path(python_path.c_str());
2747 return;
2748 }
2749
2750#ifdef __WXMSW__
2751 // windows
2752 bool errors = InstallPythonWindows(python_path, pythonConfig);
2753#else
2754 bool errors = InstallPythonUnix(python_path, pythonConfig);
2755#endif
2756 if (errors)
2757 throw std::runtime_error("Error installing python.");
2758 LoadPythonConfig();
2759}
2760
2761void SamApp::InstallPythonPackage(const std::string& pip_name) {
2762 if (CheckPythonPackageInstalled(pip_name, pythonConfig))

Callers

nothing calls this directly

Calls 3

CheckPythonInstalledFunction · 0.85
InstallPythonWindowsFunction · 0.85
InstallPythonUnixFunction · 0.85

Tested by

no test coverage detected