Matlab Linux Python: Numba causes Python Process to terminate unexpectedly

7 次查看(过去 30 天)
I am trying to import the python module "numba" (0.51.2) in Matlab 2020b (update 3 installed) running on Ubuntu 18.04 (Linux).
I set-up anaconda with basic modules installed (running Python 3.8.5)
pyenv('Version','/home/myusername/anaconda3/bin/python', "ExecutionMode","OutOfProcess")
I can then import a module such as numpy as follows:
py.importlib.import_module('numpy');
This works without any problems.
But when I try to import numba as follows, I get an error:
py.importlib.import_module('numba');
Error using py.importlib.import_module
Python process terminated unexpectedly. To restart the Python interpreter,
first call "terminate(pyenv)" and then call a Python function.
I checked my Python Environment Properties before trying to import numba:
PythonEnvironment with properties:
Version: "3.8"
Executable: "/home/myusername/anaconda3/bin/python"
Library: "/home/myusername/anaconda3/lib/libpython3.8.so"
Home: "/home/myusername/anaconda3"
Status: Loaded
ExecutionMode: OutOfProcess
ProcessID: "15165"
ProcessName: "MATLABPyHost"
Side note: All python modules are up to date. Numba is joinlty installed with llvmlite 0.32.1
MATLAB Version: 9.9.0.1538559 (R2020b) Update 3
Operating System: Linux 5.4.0-53-generic #59~18.04.1-Ubuntu SMP Wed Oct 21 12:14:56 UTC 2020 x86_64
Java Version: Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Call Python from MATLAB 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by