# Numpy shared libs are not built

**URL:** <https://discourse.slicer.org/t/numpy-shared-libs-are-not-built/12243>\
**Category:** Support\
**Created:** [June 27, 2020, 3:18pm UTC](https://discourse.slicer.org/t/numpy-shared-libs-are-not-built/12243 "2020-06-27T15:18:41Z")\
**Posts on this page:** 6\
**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:** [June 27, 2020, 3:18pm UTC](https://discourse.slicer.org/t/numpy-shared-libs-are-not-built/12243/1 "2020-06-27T15:18:41Z")

</div>

I am trying to build at 04a58a9005. The built package misses all numpy shared libs, like \_multiarray\_umath.cpython-36m-x86\_64-linux-gnu.so. This results in exceptions like

> ModuleNotFoundError: No module named ‘numpy.core.\_multiarray\_umath’

on start-up. These shared libs are simply not built at all, i.e, they are not excluded on packaging. I don’t have any clue about this.

Building on Arch Linux with clang 10 and cmake 3.17.3.

Can you advise for a fix ?

Thanks.

---

<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:** [June 27, 2020, 3:31pm UTC](https://discourse.slicer.org/t/numpy-shared-libs-are-not-built/12243/2 "2020-06-27T15:31:02Z")

</div>

Directory python-numpy is just empty in the superbuild tree, and python-numpy-prefix lists as follows :

```
ls -l python-numpy-prefix/src/python-numpy-stamp/python-numpy-*
-rw-r--r-- 1 arc arc 0 27 juin 17:16 python-numpy-prefix/src/python-numpy-stamp/python-numpy-build
-rw-r--r-- 1 arc arc 0 27 juin 17:16 python-numpy-prefix/src/python-numpy-stamp/python-numpy-configure
-rw-r--r-- 1 arc arc 0 27 juin 17:16 python-numpy-prefix/src/python-numpy-stamp/python-numpy-done
-rw-r--r-- 1 arc arc 0 27 juin 16:20 python-numpy-prefix/src/python-numpy-stamp/python-numpy-download
-rw-r--r-- 1 arc arc 0 27 juin 16:20 python-numpy-prefix/src/python-numpy-stamp/python-numpy-generate_project_description
-rw-r--r-- 1 arc arc 0 27 juin 17:16 python-numpy-prefix/src/python-numpy-stamp/python-numpy-install
-rw-r--r-- 1 arc arc 223 27 juin 17:16 python-numpy-prefix/src/python-numpy-stamp/python-numpy-install-err.log
-rw-r--r-- 1 arc arc 447 27 juin 17:16 python-numpy-prefix/src/python-numpy-stamp/python-numpy-install-out.log
-rw-r--r-- 1 arc arc 2241 27 juin 16:17 python-numpy-prefix/src/python-numpy-stamp/python-numpy-install-Release.cmake
-rw-r--r-- 1 arc arc 0 27 juin 16:20 python-numpy-prefix/src/python-numpy-stamp/python-numpy-mkdir
-rw-r--r-- 1 arc arc 0 27 juin 16:20 python-numpy-prefix/src/python-numpy-stamp/python-numpy-patch
-rw-r--r-- 1 arc arc 0 27 juin 16:20 python-numpy-prefix/src/python-numpy-stamp/python-numpy-update

```

Most files are empty !

---

<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:** [June 27, 2020, 3:35pm UTC](https://discourse.slicer.org/t/numpy-shared-libs-are-not-built/12243/4 "2020-06-27T15:35:43Z")

</div>

Are you building in debug mode?

What command has triggered ModuleNotFound error? A simple `import numpy`?

---

<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:** [June 27, 2020, 4:00pm UTC](https://discourse.slicer.org/t/numpy-shared-libs-are-not-built/12243/5 "2020-06-27T16:00:54Z")

</div>

It’s a release build actually.

The ModuleNotFoundError is in console when starting Slicer itself.

Here is the content of numpy/core :

```
ls programs/Slicer-4.11.0-2020-06-26-linux-amd64/lib/Python/lib/python3.6/site-packages/numpy/core/
_add_newdocs.py _dtype_ctypes.py function_base.py _internal.py multiarray.py records.py tests
arrayprint.py _dtype.py generate_numpy_api.py lib numeric.py setup_common.py _type_aliases.py
_asarray.py einsumfunc.py getlimits.py machar.py numerictypes.py setup.py _ufunc_config.py
cversions.py _exceptions.py include memmap.py overrides.py shape_base.py umath.py
defchararray.py fromnumeric.py __init__.py _methods.py __pycache__ _string_helpers.py umath_tests.py

```

while there are many shared libs there in a normal build :

```
cd programs/Slicer-4.11.0-2020-06-19-linux-amd64/lib/Python/lib/python3.6/site-packages/numpy/core/
#user@localhost core[0]$ ls *.so
_multiarray_tests.cpython-36m-x86_64-linux-gnu.so _rational_tests.cpython-36m-x86_64-linux-gnu.so
_multiarray_umath.cpython-36m-x86_64-linux-gnu.so _struct_ufunc_tests.cpython-36m-x86_64-linux-gnu.so
_operand_flag_tests.cpython-36m-x86_64-linux-gnu.so _umath_tests.cpython-36m-x86_64-linux-gnu.so

```

None of these shared libs get built.

Thanks for considering.

---

<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:** [June 27, 2020, 4:41pm UTC](https://discourse.slicer.org/t/numpy-shared-libs-are-not-built/12243/6 "2020-06-27T16:41:48Z")

</div>

Linux build was successful a few days ago but there are no test results available on the dashboard, because of some network error: [http://slicer.cdash.org/index.php?project=SlicerPreview](http://slicer.cdash.org/index.php?project=SlicerPreview)

@jcfr @sjh26 could you have a look? The Linux build has been having this “build error” for a while now.

@chir.set Do latest factory builds work correctly? If yes, then you can check out what exact built tools are used and how they differ from your configuration:

- [https://github.com/Slicer/DashboardScripts#maintenance-guides](https://github.com/Slicer/DashboardScripts#maintenance-guides)
- [https://www.slicer.org/wiki/Documentation/Nightly/Developers/Factory](https://www.slicer.org/wiki/Documentation/Nightly/Developers/Factory)

---

<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:** [June 27, 2020, 5:41pm UTC](https://discourse.slicer.org/t/numpy-shared-libs-are-not-built/12243/7 "2020-06-27T17:41:29Z")

</div>

Factory build works correctly at least. It means more complexity to install loadable extensions, like VMTK, every time I unpack a factory build.
