# Python errors in terminal, loading DICOM volume is slow

**URL:** <https://discourse.slicer.org/t/python-errors-in-terminal-loading-dicom-volume-is-slow/9583>\
**Category:** Support\
**Created:** [December 22, 2019, 5:30pm UTC](https://discourse.slicer.org/t/python-errors-in-terminal-loading-dicom-volume-is-slow/9583 "2019-12-22T17:30:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![chir.set](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chir.set/32/66982_2.png) [@chir.set](https://discourse.slicer.org/u/chir.set)\
**Post date:** [December 22, 2019, 5:30pm UTC](https://discourse.slicer.org/t/python-errors-in-terminal-loading-dicom-volume-is-slow/9583/1 "2019-12-22T17:30:49Z")

</div>

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:
> 
> - 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:
> 
> - 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:
> 
> - 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.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [December 22, 2019, 7:21pm UTC](https://discourse.slicer.org/t/python-errors-in-terminal-loading-dicom-volume-is-slow/9583/2 "2019-12-22T19:21:24Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![chir.set](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chir.set/32/66982_2.png) [@chir.set](https://discourse.slicer.org/u/chir.set)\
**Post date:** [December 23, 2019, 1:27pm UTC](https://discourse.slicer.org/t/python-errors-in-terminal-loading-dicom-volume-is-slow/9583/3 "2019-12-23T13:27:32Z")

</div>

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.
