Python errors in terminal, loading DICOM volume is slow

The following errors appear in terminal with home built Slicer unchanged, and not with binaries from your repository :

Traceback (most recent call last):
File “/home/user/programs/Slicer/lib/Python/lib/python3.6/site-packages/numpy/core/init.py”, line 17, in
from . import multiarray
File “/home/user/programs/Slicer/lib/Python/lib/python3.6/site-packages/numpy/core/multiarray.py”, line 14, in
from . import overrides
File “/home/user/programs/Slicer/lib/Python/lib/python3.6/site-packages/numpy/core/overrides.py”, line 7, in
from numpy.core._multiarray_umath import (
ModuleNotFoundError: No module named ‘numpy.core._multiarray_umath’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “”, line 1, in
File “/home/user/programs/Slicer/lib/Python/lib/python3.6/imp.py”, line 170, in load_source
module = _exec(spec, sys.modules[name])
File “”, line 618, in _exec
File “”, line 678, in exec_module
File “”, line 219, in _call_with_frames_removed
File “/home/user/programs/Slicer/bin/…/lib/Slicer-4.11/qt-scripted-modules/DICOMScalarVolumePlugin.py”, line 1, in
import numpy
File “/home/user/programs/Slicer/lib/Python/lib/python3.6/site-packages/numpy/init.py”, line 142, in
from . import core
File “/home/user/programs/Slicer/lib/Python/lib/python3.6/site-packages/numpy/core/init.py”, line 47, in
raise ImportError(msg)
ImportError:

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the numpy c-extensions failed.

  • Try uninstalling and reinstalling numpy.

  • If you have already done that, then:

    1. Check that you expected to use Python3.6 from “”,
      and that you have no directories in your PATH or PYTHONPATH that can
      interfere with the Python and numpy version “1.17.3” you’re trying to use.
    2. If (1) looks fine, you can open a new issue at
      https://github.com/numpy/numpy/issues. Please include details on:
      • how you installed Python
      • how you installed numpy
      • your operating system
      • whether or not you have multiple versions of Python installed
      • if you built from source, your compiler versions and ideally a build log
  • If you’re working with a numpy git repository, try git clean -xdf
    (removes all files not under version control) and rebuild numpy.

Note: this error has many possible causes, so please don’t comment on
an existing issue about this - open a new one instead.

Original error was: No module named ‘numpy.core._multiarray_umath’

loadSourceAsModule - Failed to load file “/home/user/programs/Slicer/bin/…/lib/Slicer-4.11/qt-scripted-modules/DICOMScalarVolumePlugin.py” as module “DICOMScalarVolumePlugin” !
Fail to instantiate module “DICOMScalarVolumePlugin”
Traceback (most recent call last):
File “/home/user/programs/Slicer/lib/Python/lib/python3.6/site-packages/numpy/core/init.py”, line 17, in
from . import multiarray
File “/home/user/programs/Slicer/lib/Python/lib/python3.6/site-packages/numpy/core/multiarray.py”, line 14, in
from . import overrides
File “/home/user/programs/Slicer/lib/Python/lib/python3.6/site-packages/numpy/core/overrides.py”, line 7, in
from numpy.core._multiarray_umath import (
ModuleNotFoundError: No module named ‘numpy.core._multiarray_umath’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “”, line 1, in
File “/home/user/programs/Slicer/lib/Python/lib/python3.6/imp.py”, line 170, in load_source
module = _exec(spec, sys.modules[name])
File “”, line 618, in _exec
File “”, line 678, in exec_module
File “”, line 219, in _call_with_frames_removed
File “/home/user/programs/Slicer/bin/…/lib/Slicer-4.11/qt-scripted-modules/Editor.py”, line 4, in
import EditorLib
File “/home/user/programs/Slicer/lib/Slicer-4.11/qt-scripted-modules/EditorLib/init.py”, line 37, in
exec(“from .{0} import {0}Options, {0}Tool, {0}Logic, {0}”.format(effectName))
File “”, line 1, in
File “/home/user/programs/Slicer/lib/Slicer-4.11/qt-scripted-modules/EditorLib/PaintEffect.py”, line 10, in
import numpy
File “/home/user/programs/Slicer/lib/Python/lib/python3.6/site-packages/numpy/init.py”, line 142, in
from . import core
File “/home/user/programs/Slicer/lib/Python/lib/python3.6/site-packages/numpy/core/init.py”, line 47, in
raise ImportError(msg)
ImportError:

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the numpy c-extensions failed.

  • Try uninstalling and reinstalling numpy.

  • If you have already done that, then:

    1. Check that you expected to use Python3.6 from “”,
      and that you have no directories in your PATH or PYTHONPATH that can
      interfere with the Python and numpy version “1.17.3” you’re trying to use.
    2. If (1) looks fine, you can open a new issue at
      https://github.com/numpy/numpy/issues. Please include details on:
      • how you installed Python
      • how you installed numpy
      • your operating system
      • whether or not you have multiple versions of Python installed
      • if you built from source, your compiler versions and ideally a build log
  • If you’re working with a numpy git repository, try git clean -xdf
    (removes all files not under version control) and rebuild numpy.

Note: this error has many possible causes, so please don’t comment on
an existing issue about this - open a new one instead.

Original error was: No module named ‘numpy.core._multiarray_umath’

loadSourceAsModule - Failed to load file “/home/user/programs/Slicer/bin/…/lib/Slicer-4.11/qt-scripted-modules/Editor.py” as module “Editor” !
Fail to instantiate module “Editor”
Traceback (most recent call last):
File “/home/user/programs/Slicer/lib/Python/lib/python3.6/site-packages/numpy/core/init.py”, line 17, in
from . import multiarray
File “/home/user/programs/Slicer/lib/Python/lib/python3.6/site-packages/numpy/core/multiarray.py”, line 14, in
from . import overrides
File “/home/user/programs/Slicer/lib/Python/lib/python3.6/site-packages/numpy/core/overrides.py”, line 7, in
from numpy.core._multiarray_umath import (
ModuleNotFoundError: No module named ‘numpy.core._multiarray_umath’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “”, line 1, in
File “/home/user/programs/Slicer/lib/Python/lib/python3.6/imp.py”, line 170, in load_source
module = _exec(spec, sys.modules[name])
File “”, line 618, in _exec
File “”, line 678, in exec_module
File “”, line 219, in _call_with_frames_removed
File “/home/user/programs/Slicer/bin/…/lib/Slicer-4.11/qt-scripted-modules/MultiVolumeImporterPlugin.py”, line 5, in
import vtk.util.numpy_support
File “/home/user/programs/Slicer/lib/Slicer-4.11/python3.6/site-packages/vtkmodules/util/numpy_support.py”, line 31, in
import numpy
File “/home/user/programs/Slicer/lib/Python/lib/python3.6/site-packages/numpy/init.py”, line 142, in
from . import core
File “/home/user/programs/Slicer/lib/Python/lib/python3.6/site-packages/numpy/core/init.py”, line 47, in
raise ImportError(msg)
ImportError:

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the numpy c-extensions failed.

  • Try uninstalling and reinstalling numpy.

  • If you have already done that, then:

    1. Check that you expected to use Python3.6 from “”,
      and that you have no directories in your PATH or PYTHONPATH that can
      interfere with the Python and numpy version “1.17.3” you’re trying to use.
    2. If (1) looks fine, you can open a new issue at
      https://github.com/numpy/numpy/issues. Please include details on:
      • how you installed Python
      • how you installed numpy
      • your operating system
      • whether or not you have multiple versions of Python installed
      • if you built from source, your compiler versions and ideally a build log
  • If you’re working with a numpy git repository, try git clean -xdf
    (removes all files not under version control) and rebuild numpy.

Note: this error has many possible causes, so please don’t comment on
an existing issue about this - open a new one instead.

Original error was: No module named ‘numpy.core._multiarray_umath’

loadSourceAsModule - Failed to load file “/home/user/programs/Slicer/bin/…/lib/Slicer-4.11/qt-scripted-modules/MultiVolumeImporterPlugin.py” as module “MultiVolumeImporterPlugin” !
Fail to instantiate module “MultiVolumeImporterPlugin”
The following modules failed to be instantiated:
DICOMScalarVolumePlugin
Editor
MultiVolumeImporterPlugin
Switch to module: “Volumes”

Slicer is usable, but loading a DICOM 512x512x2000+ volume gets 2 to 3 times slower, i.e, about 10 mins! This, when the volume is loaded with the ‘Add data’ menu item.

With the DICOM module, after clicking the Import DICOM files button, the studies are well listed, but none can be loaded, and thers’s no console messages.

Commit 78b60185faa2e9 mentions building on Arch with system python. If it’s mandatory, I’ll do that. I wish you could comment on this issue beforehand.

Thank you.

It seems that numpy build failed. Try rebuilding latest master version from scratch and report the first error that occurs during compilation (you did have not provided here any information about Python/numpy build error, which most likely the root cause of the runtime error).

DICOM module requires Python, so if you have any Python errors then DICOM module may not work.

These errors do not happen after a clean build. DICOM module loads any series. Could not evaluate speed wit 'Add data ’ menu item yet.

Thanks.

1 Like