13 #ifndef QmitkSetupVirtualEnvUtil_h_Included
14 #define QmitkSetupVirtualEnvUtil_h_Included
35 virtual bool SetupVirtualEnv(
const QString& venvName) = 0;
43 virtual QString GetVirtualEnvPath();
55 void PipInstall(
const std::string &library,
56 const std::string &workingDir,
57 void (*callback)(itk::Object *,
const itk::EventObject &,
void *),
58 const std::string &command =
"pip3");
67 void PipInstall(
const std::string &library,
68 void (*callback)(itk::Object *,
const itk::EventObject &,
void *),
69 const std::string &command =
"pip3");
81 void ExecutePython(
const std::string &args,
82 const std::string &pythonPath,
83 void (*callback)(itk::Object *,
const itk::EventObject &,
void *),
84 const std::string &command =
"python");
94 void ExecutePython(
const std::string &args,
95 void (*callback)(itk::Object *,
const itk::EventObject &,
void *),
96 const std::string &command =
"python");
106 void InstallPytorch(
const std::string &workingDir,
void (*callback)(itk::Object *,
const itk::EventObject &,
void *));
112 void InstallPytorch();
119 QString& GetBaseDir();
126 QString& GetSystemPythonPath();
133 QString& GetPythonPath();
140 QString& GetPipPath();
147 void SetSystemPythonPath(
const QString& path);
154 void SetPythonPath(
const QString& path);
161 void SetPipPath(
const QString& path);
168 void SetVirtualEnvPath(
const QString &path);
177 bool IsPythonPath(
const QString &pythonPath);
184 static void PrintProcessEvent(itk::Object *,
const itk::EventObject &e,
void *);
191 static std::pair<QString, QString> GetExactPythonPath(
const QString &pyEnv);
194 QString m_PythonPath;
198 QString m_SysPythonPath;