Could not load DICOM data

I’m using 4.11.20200930 r29402 / 002be18 in ArchLinux. I could not load DICOM data now, but it used to work with 4.10.2. Here is the output log:

loadSourceAsModule - Failed to load file "/opt/3dslicer/bin/../lib/Slicer-4.11/qt-scripted-modules/sceneImport2428.py"  as module "sceneImport2428" !
Fail to instantiate module  "sceneImport2428"
The following modules failed to be instantiated:
   ThresholdThreadingTest
   sceneImport2428
   DICOMScalarVolumePlugin
   MultiVolumeImporterPlugin
   DICOMImageSequencePlugin
   DICOMVolumeSequencePlugin
   Editor
Traceback (most recent call last):
  File "/opt/3dslicer/lib/Python/lib/python3.6/site-packages/numpy/core/__init__.py", line 22, in <module>
    from . import multiarray
  File "/opt/3dslicer/lib/Python/lib/python3.6/site-packages/numpy/core/multiarray.py", line 12, in <module>
    from . import overrides
  File "/opt/3dslicer/lib/Python/lib/python3.6/site-packages/numpy/core/overrides.py", line 7, in <module>
    from numpy.core._multiarray_umath import (
ImportError: libgfortran-2e0d59d6.so.5.0.0: ELF load command address/offset not properly aligned

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/opt/3dslicer/lib/Python/lib/python3.6/imp.py", line 170, in load_source
    module = _exec(spec, sys.modules[name])
  File "<frozen importlib._bootstrap>", line 618, in _exec
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/opt/3dslicer/bin/../lib/Slicer-4.11/qt-scripted-modules/sceneImport2428.py", line 8, in <module>
    import EditorLib
  File "/opt/3dslicer/lib/Slicer-4.11/qt-scripted-modules/EditorLib/__init__.py", line 37, in <module>
    exec("from .{0} import {0}Options, {0}Tool, {0}Logic, {0}".format(effectName))
  File "<string>", line 1, in <module>
  File "/opt/3dslicer/lib/Slicer-4.11/qt-scripted-modules/EditorLib/PaintEffect.py", line 10, in <module>
    import numpy
  File "/opt/3dslicer/lib/Python/lib/python3.6/site-packages/numpy/__init__.py", line 140, in <module>
    from . import core
  File "/opt/3dslicer/lib/Python/lib/python3.6/site-packages/numpy/core/__init__.py", line 48, in <module>
    raise ImportError(msg)
ImportError: 

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

Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.

We have compiled some common reasons and troubleshooting tips at:

    https://numpy.org/devdocs/user/troubleshooting-importerror.html

Please note and check the following:

  * The Python version is: Python3.6 from ""
  * The NumPy version is: "1.19.1"

and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.

Original error was: libgfortran-2e0d59d6.so.5.0.0: ELF load command address/offset not properly aligned
loadSourceAsModule - Failed to load file "/opt/3dslicer/bin/../lib/Slicer-4.11/qt-scripted-modules/ThresholdThreadingTest.py"  as module "ThresholdThreadingTest" !
Fail to instantiate module  "ThresholdThreadingTest"
Traceback (most recent call last):
  File "/opt/3dslicer/lib/Python/lib/python3.6/site-packages/numpy/core/__init__.py", line 22, in <module>
    from . import multiarray
  File "/opt/3dslicer/lib/Python/lib/python3.6/site-packages/numpy/core/multiarray.py", line 12, in <module>
    from . import overrides
  File "/opt/3dslicer/lib/Python/lib/python3.6/site-packages/numpy/core/overrides.py", line 7, in <module>
    from numpy.core._multiarray_umath import (
ImportError: libgfortran-2e0d59d6.so.5.0.0: ELF load command address/offset not properly aligned

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/opt/3dslicer/lib/Python/lib/python3.6/imp.py", line 170, in load_source
    module = _exec(spec, sys.modules[name])
  File "<frozen importlib._bootstrap>", line 618, in _exec
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/opt/3dslicer/bin/../lib/Slicer-4.11/qt-scripted-modules/ThresholdThreadingTest.py", line 6, in <module>
    import EditorLib
  File "/opt/3dslicer/lib/Slicer-4.11/qt-scripted-modules/EditorLib/__init__.py", line 37, in <module>
    exec("from .{0} import {0}Options, {0}Tool, {0}Logic, {0}".format(effectName))
  File "<string>", line 1, in <module>
  File "/opt/3dslicer/lib/Slicer-4.11/qt-scripted-modules/EditorLib/PaintEffect.py", line 10, in <module>
    import numpy
  File "/opt/3dslicer/lib/Python/lib/python3.6/site-packages/numpy/__init__.py", line 140, in <module>
    from . import core
  File "/opt/3dslicer/lib/Python/lib/python3.6/site-packages/numpy/core/__init__.py", line 48, in <module>
    raise ImportError(msg)
ImportError: 

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

Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.

We have compiled some common reasons and troubleshooting tips at:

    https://numpy.org/devdocs/user/troubleshooting-importerror.html

Please note and check the following:

  * The Python version is: Python3.6 from ""
  * The NumPy version is: "1.19.1"

and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.

Original error was: libgfortran-2e0d59d6.so.5.0.0: ELF load command address/offset not properly aligned
loadSourceAsModule - Failed to load file "/opt/3dslicer/bin/../lib/Slicer-4.11/qt-scripted-modules/MultiVolumeImporterPlugin.py"  as module "MultiVolumeImporterPlugin" !
Fail to instantiate module  "MultiVolumeImporterPlugin"
Traceback (most recent call last):
  File "/opt/3dslicer/lib/Python/lib/python3.6/site-packages/numpy/core/__init__.py", line 22, in <module>
    from . import multiarray
  File "/opt/3dslicer/lib/Python/lib/python3.6/site-packages/numpy/core/multiarray.py", line 12, in <module>
    from . import overrides
  File "/opt/3dslicer/lib/Python/lib/python3.6/site-packages/numpy/core/overrides.py", line 7, in <module>
    from numpy.core._multiarray_umath import (
ImportError: libgfortran-2e0d59d6.so.5.0.0: ELF load command address/offset not properly aligned

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/opt/3dslicer/lib/Python/lib/python3.6/imp.py", line 170, in load_source
    module = _exec(spec, sys.modules[name])
  File "<frozen importlib._bootstrap>", line 618, in _exec
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/opt/3dslicer/bin/../lib/Slicer-4.11/qt-scripted-modules/MultiVolumeImporterPlugin.py", line 5, in <module>
    import vtk.util.numpy_support
  File "/opt/3dslicer/lib/Slicer-4.11/python3.6/site-packages/vtkmodules/util/numpy_support.py", line 31, in <module>
    import numpy
  File "/opt/3dslicer/lib/Python/lib/python3.6/site-packages/numpy/__init__.py", line 140, in <module>
    from . import core
  File "/opt/3dslicer/lib/Python/lib/python3.6/site-packages/numpy/core/__init__.py", line 48, in <module>
    raise ImportError(msg)
ImportError: 

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

Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.

We have compiled some common reasons and troubleshooting tips at:

    https://numpy.org/devdocs/user/troubleshooting-importerror.html

Please note and check the following:

  * The Python version is: Python3.6 from ""
  * The NumPy version is: "1.19.1"

and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.

Original error was: libgfortran-2e0d59d6.so.5.0.0: ELF load command address/offset not properly aligned
loadSourceAsModule - Failed to load file "/opt/3dslicer/bin/../lib/Slicer-4.11/qt-scripted-modules/Editor.py"  as module "Editor" !
Fail to instantiate module  "Editor"
Traceback (most recent call last):
  File "/opt/3dslicer/lib/Python/lib/python3.6/site-packages/numpy/core/__init__.py", line 22, in <module>
    from . import multiarray
  File "/opt/3dslicer/lib/Python/lib/python3.6/site-packages/numpy/core/multiarray.py", line 12, in <module>
    from . import overrides
  File "/opt/3dslicer/lib/Python/lib/python3.6/site-packages/numpy/core/overrides.py", line 7, in <module>
    from numpy.core._multiarray_umath import (
ImportError: libgfortran-2e0d59d6.so.5.0.0: ELF load command address/offset not properly aligned

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/opt/3dslicer/lib/Python/lib/python3.6/imp.py", line 170, in load_source
    module = _exec(spec, sys.modules[name])
  File "<frozen importlib._bootstrap>", line 618, in _exec
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/opt/3dslicer/bin/../lib/Slicer-4.11/qt-scripted-modules/Editor.py", line 4, in <module>
    import EditorLib
  File "/opt/3dslicer/lib/Slicer-4.11/qt-scripted-modules/EditorLib/__init__.py", line 37, in <module>
    exec("from .{0} import {0}Options, {0}Tool, {0}Logic, {0}".format(effectName))
  File "<string>", line 1, in <module>
  File "/opt/3dslicer/lib/Slicer-4.11/qt-scripted-modules/EditorLib/PaintEffect.py", line 10, in <module>
    import numpy
  File "/opt/3dslicer/lib/Python/lib/python3.6/site-packages/numpy/__init__.py", line 140, in <module>
    from . import core
  File "/opt/3dslicer/lib/Python/lib/python3.6/site-packages/numpy/core/__init__.py", line 48, in <module>
    raise ImportError(msg)
ImportError: 

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

Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.

We have compiled some common reasons and troubleshooting tips at:

    https://numpy.org/devdocs/user/troubleshooting-importerror.html

Please note and check the following:

  * The Python version is: Python3.6 from ""
  * The NumPy version is: "1.19.1"

and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.

Original error was: libgfortran-2e0d59d6.so.5.0.0: ELF load command address/offset not properly aligned
loadSourceAsModule - Failed to load file "/opt/3dslicer/bin/../lib/Slicer-4.11/qt-scripted-modules/DICOMVolumeSequencePlugin.py"  as module "DICOMVolumeSequencePlugin" !
Fail to instantiate module  "DICOMVolumeSequencePlugin"
Traceback (most recent call last):
  File "/opt/3dslicer/lib/Python/lib/python3.6/site-packages/numpy/core/__init__.py", line 22, in <module>
    from . import multiarray
  File "/opt/3dslicer/lib/Python/lib/python3.6/site-packages/numpy/core/multiarray.py", line 12, in <module>
    from . import overrides
  File "/opt/3dslicer/lib/Python/lib/python3.6/site-packages/numpy/core/overrides.py", line 7, in <module>
    from numpy.core._multiarray_umath import (
ImportError: libgfortran-2e0d59d6.so.5.0.0: ELF load command address/offset not properly aligned

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/opt/3dslicer/lib/Python/lib/python3.6/imp.py", line 170, in load_source
    module = _exec(spec, sys.modules[name])
  File "<frozen importlib._bootstrap>", line 618, in _exec
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/opt/3dslicer/bin/../lib/Slicer-4.11/qt-scripted-modules/DICOMVolumeSequencePlugin.py", line 5, in <module>
    import numpy
  File "/opt/3dslicer/lib/Python/lib/python3.6/site-packages/numpy/__init__.py", line 140, in <module>
    from . import core
  File "/opt/3dslicer/lib/Python/lib/python3.6/site-packages/numpy/core/__init__.py", line 48, in <module>
    raise ImportError(msg)
ImportError: 

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

Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.

We have compiled some common reasons and troubleshooting tips at:

    https://numpy.org/devdocs/user/troubleshooting-importerror.html

Please note and check the following:

  * The Python version is: Python3.6 from ""
  * The NumPy version is: "1.19.1"

and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.

Original error was: libgfortran-2e0d59d6.so.5.0.0: ELF load command address/offset not properly aligned
loadSourceAsModule - Failed to load file "/opt/3dslicer/bin/../lib/Slicer-4.11/qt-scripted-modules/DICOMScalarVolumePlugin.py"  as module "DICOMScalarVolumePlugin" !
Fail to instantiate module  "DICOMScalarVolumePlugin"
Traceback (most recent call last):
  File "/opt/3dslicer/lib/Python/lib/python3.6/site-packages/numpy/core/__init__.py", line 22, in <module>
    from . import multiarray
  File "/opt/3dslicer/lib/Python/lib/python3.6/site-packages/numpy/core/multiarray.py", line 12, in <module>
    from . import overrides
  File "/opt/3dslicer/lib/Python/lib/python3.6/site-packages/numpy/core/overrides.py", line 7, in <module>
    from numpy.core._multiarray_umath import (
ImportError: libgfortran-2e0d59d6.so.5.0.0: ELF load command address/offset not properly aligned

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/opt/3dslicer/lib/Python/lib/python3.6/imp.py", line 170, in load_source
    module = _exec(spec, sys.modules[name])
  File "<frozen importlib._bootstrap>", line 618, in _exec
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/opt/3dslicer/bin/../lib/Slicer-4.11/qt-scripted-modules/DICOMScalarVolumePlugin.py", line 1, in <module>
    import numpy
  File "/opt/3dslicer/lib/Python/lib/python3.6/site-packages/numpy/__init__.py", line 140, in <module>
    from . import core
  File "/opt/3dslicer/lib/Python/lib/python3.6/site-packages/numpy/core/__init__.py", line 48, in <module>
    raise ImportError(msg)
ImportError: 

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

Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.

We have compiled some common reasons and troubleshooting tips at:

    https://numpy.org/devdocs/user/troubleshooting-importerror.html

Please note and check the following:

  * The Python version is: Python3.6 from ""
  * The NumPy version is: "1.19.1"

and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.

Original error was: libgfortran-2e0d59d6.so.5.0.0: ELF load command address/offset not properly aligned
loadSourceAsModule - Failed to load file "/opt/3dslicer/bin/../lib/Slicer-4.11/qt-scripted-modules/DICOMImageSequencePlugin.py"  as module "DICOMImageSequencePlugin" !
Fail to instantiate module  "DICOMImageSequencePlugin"
Traceback (most recent call last):
  File "/opt/3dslicer/lib/Python/lib/python3.6/site-packages/numpy/core/__init__.py", line 22, in <module>
    from . import multiarray
  File "/opt/3dslicer/lib/Python/lib/python3.6/site-packages/numpy/core/multiarray.py", line 12, in <module>
    from . import overrides
  File "/opt/3dslicer/lib/Python/lib/python3.6/site-packages/numpy/core/overrides.py", line 7, in <module>
    from numpy.core._multiarray_umath import (
ImportError: libgfortran-2e0d59d6.so.5.0.0: ELF load command address/offset not properly aligned

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/opt/3dslicer/lib/Python/lib/python3.6/imp.py", line 170, in load_source
    module = _exec(spec, sys.modules[name])
  File "<frozen importlib._bootstrap>", line 618, in _exec
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/opt/3dslicer/bin/../lib/Slicer-4.11/qt-scripted-modules/DICOMImageSequencePlugin.py", line 5, in <module>
    import numpy
  File "/opt/3dslicer/lib/Python/lib/python3.6/site-packages/numpy/__init__.py", line 140, in <module>
    from . import core
  File "/opt/3dslicer/lib/Python/lib/python3.6/site-packages/numpy/core/__init__.py", line 48, in <module>
    raise ImportError(msg)
ImportError: 

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

Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.

We have compiled some common reasons and troubleshooting tips at:

    https://numpy.org/devdocs/user/troubleshooting-importerror.html

Please note and check the following:

  * The Python version is: Python3.6 from ""
  * The NumPy version is: "1.19.1"

and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.

Original error was: libgfortran-2e0d59d6.so.5.0.0: ELF load command address/offset not properly aligned
Session start time .......: 2020-10-23 15:11:51
Slicer version ...........: 4.11.20200930 (revision 29402 / 002be18) linux-amd64 - installed release
Operating system .........: Linux / 5.4.72-1-lts / #1 SMP Sat, 17 Oct 2020 13:30:57 +0000 - 64-bit
Memory ...................: 15791 MB physical, 0 MB virtual
CPU ......................: GenuineIntel Intel(R) Core(TM) i7-9700 CPU @ 3.00GHz, 8 cores, 8 logical processors
VTK configuration ........: OpenGL2 rendering, Sequential threading
Qt configuration .........: version 5.15.1, with SSL, requested OpenGL 3.2 (core profile)
Developer mode enabled ...: no
Prefer executable CLI ....: yes
Application path .........: /opt/3dslicer/bin
Additional module paths ..: (none)

It seems a lot of modules fail to init. BTW, where does slicer store its log file? I just copy these messages from the log message window.

it appears there’s a problem with your python setup that prevents slicer from finding its own libraries and packages. Slicer’s launcher should be putting Slicer’s requirements at the front of the path variables, but perhaps there’s something in your config that breaks that (I don’t use ArchLinux so I’m not sure what it does). Try running from a clean environment.

I don’t build 3dslicer from the source in ArchLinux, I just download the binary package from and re-package it. ArchLinux’s build tool will run strip by default, I disable it, and it works now.

Thanks for reporting back. I started a PR to add this info to the install docs. Can you add a little more detail (specifically, what command is needed to disable strip?)

If you like, you could simply install 3dslicer from ArchLinux CN repo by:

pacman -S 3dslicer-bin
# or
pacman -S 3dslicer-nightly-bin

after adding the ArchLinux CN repo.
Note: this is an unofficial/third-party repo.

The PKGBUILD file is available on AUR. As you can see, it simply repacks the binary tarball, and add a user-friendly desktop entry. Also, by setting

options=(!strip !emptydirs)

the empty dirs would be removed, and strip is not run. That’s all.
If you download the official slicer tarball, extract, and run it, there is no issue related with strip.

BTW, I’m trying to build slicer from the source for ArchLinux. maybe I could help update this doc.

Thanks @ButuiHu - that’s very helpful. I haven’t used ArchLinux myself but I can see there’s a very active community so it’s good we can support it. For now I just updated the documentation PR to point to this discussion thread.