Opening ALPACA for the first time and stuck on "Installing ALPACA Python Packages...."

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!

Thanks for reporting. I can reproduce this in a fresh install. Opened an issue ALPACA failing to install on 5.8.1 on windows due to ITK error · Issue #402 · SlicerMorph/SlicerMorph · GitHub you can track its update.

@jsguerra If you are tracking the github issue, until the fix is integrated, the workaround is to manually install the numpy. These steps worked for me:

  1. in Python console type `pip_install(“numpy==2.00”)’
  2. Restart Slicer
  3. Switch to ALPACA

It should continue installing remaining packages (pandas) and then ALPACA should be working.

1 Like

@muratmaga Yes, I was literally just looking through the github issue! I’ll try your instructions, thank you!

1 Like