ITADN

Pytoshop error

#16ClosedTijuanaKez 创建于 2023-06-03
bug
T
TijuanaKezcommented
**Describe the bug** Extension won't load due to Pytoshop error. ``` Installing Layer Divider Extension: Installing pytoshop==1.1.0 Error loading script: layer_divider.py Traceback (most recent call last): File "/Users/Me/stable-diffusion-webui/modules/scripts.py", line 263, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "/Users/Me/stable-diffusion-webui/modules/script_loading.py", line 10, in load_module module_spec.loader.exec_module(module) File "<frozen importlib._bootstrap_external>", line 883, in exec_module File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed File "/Users/Me/stable-diffusion-webui/extensions/stable-diffusion-webui-Layer-Divider/scripts/layer_divider.py", line 2, in <module> install_sam() File "/Users/Me/stable-diffusion-webui/extensions/stable-diffusion-webui-Layer-Divider/scripts/layer_divider_modules/installation.py", line 19, in install_sam is_extension_there = any(filename.endswith(('.so', '.pyd')) for filename in os.listdir(pytoshop_path)) FileNotFoundError: [Errno 2] No such file or directory: '/Users/Me/stable-diffusion-webui/venv/Lib/site-packages/pytoshop' ``` Tried installing Pytoshop into the environment manually with pip but it says its already installed ``` Me@MeMacPro stable-diffusion-webui % source venv/bin/activate (venv) Me@MeMacPro stable-diffusion-webui % pip install pytoshop Requirement already satisfied: pytoshop in ./venv/lib/python3.10/site-packages (1.1.0) Requirement already satisfied: cython in ./venv/lib/python3.10/site-packages (from pytoshop) (0.29.35) Requirement already satisfied: numpy in ./venv/lib/python3.10/site-packages (from pytoshop) (1.23.5) ``` **OS you are using:** macOS Ventura EDIT: Okay I see the problem from re-reading this post. changed in install.py `pytoshop_path = os.path.join(sd_path, 'venv', ‘Lib', 'site-packages', 'pytoshop')` to `pytoshop_path = os.path.join(sd_path, 'venv', 'lib', 'python3.10', 'site-packages', 'pytoshop')` and it works.
关闭于 2024-07-05 3 条评论