Browse Source

Update __init__.py

pull/7/head
tin2tin 2 years ago committed by GitHub
parent
commit
eb49630f10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 18
      __init__.py

18
__init__.py

@ -46,17 +46,6 @@ def set_system_console_topmost(top):
SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER,
)
app_path = site.USER_SITE
if app_path not in sys.path:
sys.path.append(app_path)
pybin = sys.executable
print("Ensuring: pip")
try:
subprocess.call([pybin, "-m", "ensurepip"])
subprocess.call([pybin, "-m", "pip", "install", "--upgrade","pip"])
except ImportError:
pass
def import_module(self, module, install_module):
show_system_console(True)
@ -98,6 +87,13 @@ class SequencerImportMovieOperator(Operator):
sys.path.append(app_path)
pybin = sys.executable
print("Ensuring: pip")
try:
subprocess.call([pybin, "-m", "ensurepip"])
subprocess.call([pybin, "-m", "pip", "install", "--upgrade","pip"])
except ImportError:
pass
import_module(self, "open_clip_torch", "open_clip_torch")
import_module(self, "pytorch_lightning", "pytorch_lightning")
import_module(self, "addict", "addict")

Loading…
Cancel
Save