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);
183 static bool IsVenvInstalled(
const QString &pythonPath);
189 static QString GetPipPackageVersion(
const QString &pythonPath,
const QString &packageName);
196 static void PrintProcessEvent(itk::Object *,
const itk::EventObject &e,
void *);
203 static std::pair<QString, QString> GetExactPythonPath(
const QString &pyEnv);
206 QString m_PythonPath;
210 QString m_SysPythonPath;