I did a clean build of a recent version (9e9decc80e1bb922459799a260c558fc4ee90b06) yesterday. Build completed without errors. But when I try to run it, DICOMScalarVolumePlugin.py
picks up system numpy which prevents some python modules from loading (many modules depend on DICOMScalarVolumePlugin in my own fork of Slicer). Stack trace is below.
This happens on Linux, but not on Windows. It also happens to a version of Slicer from August 3rd with a few cherry-picked commits on top. Did anyone encounter this? Any suggestions on how to fix it?
[461/461] Completed 'Slicer'
dzenan@corista:~/Slicer-rel$ Slicer-build/Slicer
Number of registered modules: 101
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/dzenan/Slicer-rel/Slicer-build/lib/Slicer-4.7/qt-scripted-modules/DICOMScalarVolumePlugin.py", line 1, in <module>
import numpy
File "/home/dzenan/.local/lib/python2.7/site-packages/numpy/__init__.py", line 180, in <module>
from . import add_newdocs
File "/home/dzenan/.local/lib/python2.7/site-packages/numpy/add_newdocs.py", line 13, in <module>
from numpy.lib import add_newdoc
File "/home/dzenan/.local/lib/python2.7/site-packages/numpy/lib/__init__.py", line 8, in <module>
from .type_check import *
File "/home/dzenan/.local/lib/python2.7/site-packages/numpy/lib/type_check.py", line 11, in <module>
import numpy.core.numeric as _nx
File "/home/dzenan/.local/lib/python2.7/site-packages/numpy/core/__init__.py", line 14, in <module>
from . import multiarray
ImportError: /home/dzenan/.local/lib/python2.7/site-packages/numpy/core/multiarray.so: undefined symbol: _PyUnicodeUCS4_IsWhitespace
loadSourceAsModule - Failed to load file "/home/dzenan/Slicer-rel/Slicer-build/lib/Slicer-4.7/qt-scripted-modules/DICOMScalarVolumePlugin.py" as module "DICOMScalarVolumePlugin" !
Fail to instantiate module "DICOMScalarVolumePlugin"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/dzenan/Slicer-rel/Slicer-build/lib/Slicer-4.7/qt-scripted-modules/Editor.py", line 4, in <module>
import EditorLib
File "/home/dzenan/Slicer-rel/Slicer-build/lib/Slicer-4.7/qt-scripted-modules/EditorLib/__init__.py", line 14, in <module>
from PaintEffect import *
File "/home/dzenan/Slicer-rel/Slicer-build/lib/Slicer-4.7/qt-scripted-modules/EditorLib/PaintEffect.py", line 9, in <module>
import numpy
File "/home/dzenan/.local/lib/python2.7/site-packages/numpy/__init__.py", line 180, in <module>
from . import add_newdocs
File "/home/dzenan/.local/lib/python2.7/site-packages/numpy/add_newdocs.py", line 13, in <module>
from numpy.lib import add_newdoc
File "/home/dzenan/.local/lib/python2.7/site-packages/numpy/lib/__init__.py", line 8, in <module>
from .type_check import *
File "/home/dzenan/.local/lib/python2.7/site-packages/numpy/lib/type_check.py", line 11, in <module>
import numpy.core.numeric as _nx
File "/home/dzenan/.local/lib/python2.7/site-packages/numpy/core/__init__.py", line 14, in <module>
from . import multiarray
ImportError: /home/dzenan/.local/lib/python2.7/site-packages/numpy/core/multiarray.so: undefined symbol: _PyUnicodeUCS4_IsWhitespace
loadSourceAsModule - Failed to load file "/home/dzenan/Slicer-rel/Slicer-build/lib/Slicer-4.7/qt-scripted-modules/Editor.py" as module "Editor" !
Fail to instantiate module "Editor"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/dzenan/Slicer-rel/Slicer-build/lib/Slicer-4.7/qt-scripted-modules/MultiVolumeImporterPlugin.py", line 4, in <module>
import vtk.util.numpy_support
File "/home/dzenan/Slicer-rel/VTKv8-build/Wrapping/Python/vtk/util/numpy_support.py", line 30, in <module>
import numpy
File "/home/dzenan/.local/lib/python2.7/site-packages/numpy/__init__.py", line 180, in <module>
from . import add_newdocs
File "/home/dzenan/.local/lib/python2.7/site-packages/numpy/add_newdocs.py", line 13, in <module>
from numpy.lib import add_newdoc
File "/home/dzenan/.local/lib/python2.7/site-packages/numpy/lib/__init__.py", line 8, in <module>
from .type_check import *
File "/home/dzenan/.local/lib/python2.7/site-packages/numpy/lib/type_check.py", line 11, in <module>
import numpy.core.numeric as _nx
File "/home/dzenan/.local/lib/python2.7/site-packages/numpy/core/__init__.py", line 14, in <module>
from . import multiarray
ImportError: /home/dzenan/.local/lib/python2.7/site-packages/numpy/core/multiarray.so: undefined symbol: _PyUnicodeUCS4_IsWhitespace
loadSourceAsModule - Failed to load file "/home/dzenan/Slicer-rel/Slicer-build/lib/Slicer-4.7/qt-scripted-modules/MultiVolumeImporterPlugin.py" as module "MultiVolumeImporterPlugin" !
Fail to instantiate module "MultiVolumeImporterPlugin"
Number of instantiated modules: 98
Number of loaded modules: 98
Switch to module: "Welcome"