Hi,
I have tried the simple AOT example from the website (see below). However, when I run the example i get the following error below. I found this webpage with a similar error but it did not help me any further:
https://github.com/numba/numba/issues/3304
Can anyone please help me with this issue, since I am totally lost on what to do.
I am using numba: 0.51.2
and numpy: 1.15.0
I installed both via pip
Thanks for your help
ERROR:
-------------
Traceback (most recent call last):
File "C:/WorkDir/SoftwareDev/AdditiveLabRESEARCH/numbautilities/test.py", line 3, in <module>
cc = CC('my_module')
File "C:\Python36\lib\site-packages\numba\pycc\cc.py", line 65, in __init__
self._toolchain = Toolchain()
File "C:\Python36\lib\site-packages\numba\pycc\platform.py", line 78, in __init__
self._raise_external_compiler_error()
File "C:\Python36\lib\site-packages\numba\pycc\platform.py", line 121, in _raise_external_compiler_error
raise RuntimeError(msg)
RuntimeError: Attempted to compile AOT function without the compiler used by `numpy.distutils` present. Cannot find suitable msvc.
Process finished with exit code 1
EXAMPLE:
-----------------
from numba.pycc import CC
cc = CC('my_module')
# Uncomment the following line to print out the compilation steps
#cc.verbose = True
@cc.export('multf', 'f8(f8, f8)')
@cc.export('multi', 'i4(i4, i4)')
def mult(a, b):
return a * b
@cc.export('square', 'f8(f8)')
def square(a):
return a ** 2
if __name__ == "__main__":
cc.compile()