Open python installation page if module is missing

This commit is contained in:
N00MKRAD
2020-12-10 17:59:11 +01:00
parent 97f1548841
commit 770deff022
3 changed files with 15 additions and 2 deletions

View File

@@ -270,6 +270,8 @@ namespace Flowframes
{
hasShownError = true;
InterpolateUtils.ShowMessage($"A python module is missing.\nCheck {logFilename} for details.\n\n{line}\n\nIf you don't want to install it yourself, use the Python package from the Package Installer.", "Error");
if(!Pytorch.HasEmbeddedPyFolder())
Process.Start("https://github.com/n00mkrad/flowframes/blob/main/PythonDependencies.md");
}
if (!hasShownError && line.ToLower().Contains("no longer supports this gpu"))

View File

@@ -14,7 +14,7 @@ namespace Flowframes.OS
public static string GetPyCmd ()
{
if (Directory.Exists(Path.Combine(Paths.GetPkgPath(), "py-tu")) || Directory.Exists(Path.Combine(Paths.GetPkgPath(), "py-ampt")))
if (HasEmbeddedPyFolder())
{
Logger.Log("Using embedded Python runtime.");
string pyPkgDir = Path.Combine(Paths.GetPkgPath(), "py-amp");
@@ -39,6 +39,11 @@ namespace Flowframes.OS
return "";
}
public static bool HasEmbeddedPyFolder ()
{
return Directory.Exists(Path.Combine(Paths.GetPkgPath(), "py-tu")) || Directory.Exists(Path.Combine(Paths.GetPkgPath(), "py-ampt"));
}
public static bool IsPytorchReady ()
{
string torchVer = GetPytorchVer();

View File

@@ -8,3 +8,9 @@
This should be sufficient to run RIFE and other Pytorch-based networks on any modern GPU, including the RTX 3000 (Ampere) series.
## Troubleshooting
If you are getting some kind of numpy error, try downgrading it to 1.19.3:
`pip install numpy==1.19.3`