chsh2 / nijiGPen

An add-on of Blender focusing on Grease Pencil
GNU General Public License v3.0
241 stars 12 forks source link

I have something wrong with click check box about this add_on #25

Open bolvabolv opened 1 year ago

bolvabolv commented 1 year ago

Traceback (most recent call last): File "F:\blender\blender-3.3.7-stable+v33.659c307f2502-windows.amd64-release\3.3\scripts\modules\addon_utils.py", line 333, in enable mod = import(module_name) File "C:\Users\Administrator\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\nijigp__init.py", line 29, in auto_load.init() File "C:\Users\Administrator\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\nijigp\auto_load.py", line 25, in init modules = get_all_submodules(Path(file).parent) File "C:\Users\Administrator\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\nijigp\auto_load.py", line 53, in get_all_submodules return list(iter_submodules(directory, directory.name)) File "C:\Users\Administrator\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\nijigp\auto_load.py", line 57, in iter_submodules yield importlib.import_module("." + name, package_name) File "F:\blender\blender-3.3.7-stable+v33.659c307f2502-windows.amd64-release\3.3\python\lib\importlib\init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "C:\Users\Administrator\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\nijigp\operators\operator_fill.py", line 3, in from ..solvers.graph import SmartFillSolver File "C:\Users\Administrator\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\nijigp\solvers\graph.py", line 3, in from scipy.sparse import csr_matrix, csgraph ModuleNotFoundError: No module named 'scipy'

Would you know how to solve it?Thanks so much!

bolvabolv commented 1 year ago

This only happen when i tried to use version 0.5.0, those history version work well.

bolvabolv commented 1 year ago

import subprocess import sys

subprocess.check_call([sys.executable, "-m", "pip", "install", "scipy"])

I just solved my problem by adding the above command to blender's script and running it,even though I don't know anything about programming, I still don't know how this works

chsh2 commented 1 year ago

It looks like the add-on is trying to check if the Python package is installed before it has a chance to actually install it. I think it is a bug.

I tried to fix this problem in the new release. (The old version needs to be removed first.) Please let me know if there are still problems.