MagnumVD / RotoForge-AI

An implementation of SAM-HQ + some other stuff to make rotoscoping in blender fast af
Other
29 stars 1 forks source link

[Request] Support Linux #15

Open m1lkweed opened 1 week ago

m1lkweed commented 1 week ago

Currently, the add-on relies on the system having a /bin/python.exe in the path and it assumes that pip can be reliably called outside a virtual environment. Linux systems aren't going to have any .exes for python and on modern systems pip will intentionally fail to install anything unless a venv is set up (Blender should already do this, so use the supported method). Here's the log from when I tried to install:

Modules Installed (RotoForge-AI) from '/home/████/Downloads/RotoForge-AI-1_0_1-hotfix_3.zip' into '/home/████/.config/blender/4.2/scripts/addons'
Rotoforge AI: missing model ████_hq_vit_b.pth
RotoForge AI: Some dependencies are not installed, please install them using the button in the Preferences.
Rotoforge AI: missing model ████_hq_vit_b.pth
RotoForge AI: Some dependencies are not installed, please install them using the button in the Preferences.
Rotoforge AI: missing model ████_hq_vit_b.pth
RotoForge AI: Some dependencies are not installed, please install them using the button in the Preferences.
Rotoforge AI: missing model ████_hq_vit_b.pth
RotoForge AI: Some dependencies are not installed, please install them using the button in the Preferences.
Rotoforge AI: missing model ████_hq_vit_b.pth
RotoForge AI: Some dependencies are not installed, please install them using the button in the Preferences.
Rotoforge AI: missing model ████_hq_vit_b.pth
RotoForge AI: Some dependencies are not installed, please install them using the button in the Preferences.
Rotoforge AI: missing model ████_hq_vit_b.pth
RotoForge AI: Some dependencies are not installed, please install them using the button in the Preferences.
Rotoforge AI: missing model ████_hq_vit_b.pth
RotoForge AI: Some dependencies are not installed, please install them using the button in the Preferences.
Rotoforge AI: missing model ████_hq_vit_b.pth
RotoForge AI: Some dependencies are not installed, please install them using the button in the Preferences.
Rotoforge AI: missing model ████_hq_vit_b.pth
RotoForge AI: Some dependencies are not installed, please install them using the button in the Preferences.
RotoForge AI: An ImportError occured when importing the dependencies
No module named 'segment_anything_hq'
Traceback (most recent call last):
  File "/home/████/.config/blender/4.2/scripts/addons/RotoForge-AI/__init__.py", line 27, in execute
    install_dependencies.install_packages()
  File "/home/████/.config/blender/4.2/scripts/addons/RotoForge-AI/functions/install_dependencies.py", line 66, in install_packages
    subprocess.call([python_exe, '-m', 'ensurepip'])
  File "/home/████/Downloads/blender-4.2.0-alpha+main.8d13a9608be3-linux.x86_64-release/4.2/python/lib/python3.11/subprocess.py", line 389, in call
    with Popen(*popenargs, **kwargs) as p:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/████/Downloads/blender-4.2.0-alpha+main.8d13a9608be3-linux.x86_64-release/4.2/python/lib/python3.11/subprocess.py", line 1026, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/home/████/Downloads/blender-4.2.0-alpha+main.8d13a9608be3-linux.x86_64-release/4.2/python/lib/python3.11/subprocess.py", line 1950, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/home/████/Downloads/blender-4.2.0-alpha+main.8d13a9608be3-linux.x86_64-release/4.2/python/bin/python.exe'
Error: Python: Traceback (most recent call last):
  File "/home/████/Downloads/blender-4.2.0-alpha+main.8d13a9608be3-linux.x86_64-release/4.2/python/lib/python3.11/subprocess.py", line 1026, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/home/████/Downloads/blender-4.2.0-alpha+main.8d13a9608be3-linux.x86_64-release/4.2/python/lib/python3.11/subprocess.py", line 1950, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/home/████/Downloads/blender-4.2.0-alpha+main.8d13a9608be3-linux.x86_64-release/4.2/python/bin/python.exe'
Rotoforge AI: missing model ████_hq_vit_b.pth
RotoForge AI: Some dependencies are not installed, please install them using the button in the Preferences.