I recently upgraded my SSD and re-installed Slicermorph and the ALPACA extension. I went ahead and tried to open ALPACA for the first time since the new install and I seem to be stuck in the “Installing ALPACA Python Packages. This may take a minute..” pop-up for about 10 minutes (before writing this).
When I look at the Python console, the following output is in red letters:
In the future np.bool
will be defined as the corresponding NumPy scalar.
Traceback (most recent call last):
File “C:/Users/JSG/AppData/Local/slicer.org/Slicer 5.8.1/slicer.org/Extensions-33241/SlicerMorph/lib/Slicer-5.8/qt-scripted-modules/ALPACA.py”, line 126, in setup
import itk
File “C:\Users\JSG\AppData\Local\slicer.org\Slicer 5.8.1\lib\Python\Lib\site-packages\itk_init_.py”, line 59, in
from itk.support.extras import *
File “C:\Users\JSG\AppData\Local\slicer.org\Slicer 5.8.1\lib\Python\Lib\site-packages\itk\support\extras.py”, line 37, in
import itk.support.types as itkt
File “C:\Users\JSG\AppData\Local\slicer.org\Slicer 5.8.1\lib\Python\Lib\site-packages\itk\support\types.py”, line 178, in
) = itkCType.initialize_c_types_once()
File “C:\Users\JSG\AppData\Local\slicer.org\Slicer 5.8.1\lib\Python\Lib\site-packages\itk\support\types.py”, line 143, in initialize_c_types_once
B: “itkCType” = itkCType(“bool”, “B”, np.dtype(np.bool))
File "C:\Users\JSG\AppData\Local\slicer.org\Slicer 5.8.1\lib\Python\Lib\site-packages\numpy_init.py", line 353, in getattr
raise AttributeError(former_attrs[attr])
AttributeError: module ‘numpy’ has no attribute ‘bool’.
np.bool
was a deprecated alias for the builtin bool
. To avoid this error in existing code, use bool
by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.bool_
here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
NumPy 1.20.0 Release Notes — NumPy v2.4.dev0 Manual
Any help would be greatly appreciated!