From 0862f68b163a39d5fca8603c87380ce98ceae0a4 Mon Sep 17 00:00:00 2001 From: Bazza Date: Sat, 23 Dec 2023 17:45:56 -0300 Subject: [PATCH] Update __init__.py (#98) Linux compatibility --- __init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/__init__.py b/__init__.py index a1940d9..cc47074 100644 --- a/__init__.py +++ b/__init__.py @@ -41,7 +41,6 @@ import shutil from datetime import date import pathlib temp = pathlib.PosixPath -pathlib.PosixPath = pathlib.WindowsPath try: exec("import torch") @@ -57,7 +56,8 @@ except ModuleNotFoundError: ) os_platform = platform.system() # 'Linux', 'Darwin', 'Java', 'Windows' - +if os_platform == "Windows": + pathlib.PosixPath = pathlib.WindowsPath def show_system_console(show): if os_platform == "Windows":