Import numpy error

I cannot import numpy inside 3-matic. I can import it in pycharm and spyder and control 3-matic externally just fine, but would like to be able to use numpy from 3-matic. Because I can import it elsewhere, I think this is an error with how 3-matic is attempting to import the module. I am also starting an issue with numpy on github; in case the error is on their side.

import numpy as np

Traceback (most recent call last):

File “C:\Users\Npyle1.conda\envs\3mat\lib\site-packages\numpy\”, line 17, in
from . import multiarray
File “C:\Users\Npyle1.conda\envs\3mat\lib\site-packages\numpy\core\”, line 14, in
from . import overrides
File “C:\Users\Npyle1.conda\envs\3mat\lib\site-packages\numpy\core\”, line 7, in
from numpy.core._multiarray_umath import (
ImportError: DLL load failed: The specified module could not be found.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “”, line 1, in
File “C:\Users\Npyle1.conda\envs\3mat\lib\site-packages\”, line 142, in
from . import core
File “C:\Users\Npyle1.conda\envs\3mat\lib\site-packages\numpy\”, line 47, in
raise ImportError(msg)


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.7 from “C:\Program Files\Materialise\3-matic 14.0 (x64)\3-matic.exe”,
      and that you have no directories in your PATH or PYTHONPATH that can
      interfere with the Python and numpy version “1.17.1” you’re trying to use.
    2. If (1) looks fine, you can open a new issue at 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

Original error was: DLL load failed: The specified module could not be found.

Hello Nathaniel,

I see that you are using Conda.
MIS v.20.0–22.0 does not support Conda’s virtual Python environments out-of-the-box.

However, in you case with import numpy there exists a workaround, which can scripted.

Please add this snippet at the start of your script (or, to be precise - before importing numpy or similar):

import os
import sys

env_p = sys.prefix  # path to the env
print("Env. path: {}".format(env_p))

new_p = ''
for extra_p in (r"Library\mingw-w64\bin",
    new_p +=  os.path.join(env_p, extra_p) + ';'

os.environ["PATH"] = new_p + os.environ["PATH"]  # set it for Python
os.putenv("PATH", os.environ["PATH"])  # push it at the OS level

We expect it to work for the both 3-matic and Mimics.
If not, please try not to use Conda’s virtual environments, but conventional Python.

Best regards, Vladimir

PS: it has been tested against MIS v.22.0 and Conda 4.7.10: