Skip to content

i'm getting this. what might be my problem? #8

@kangpyo

Description

@kangpyo

I have been trying to implement this code.
I have installed Matlab 2019b which was downgrade to Matlab 2020a due to compatibility of MATLAB engine API.
I have installed python 3.9 and pycharm. the environment set to MATLAB home.
but I'm still receiving the error message.

I deleted the package in Julia and reinstalled again.
i added "sys.path.append("matlab19bPy36")" and still get the same error message.

what might be my problem?
can you help me?

Error from Julia
InitError: PyError ($(Expr(:escape, :(ccall(#= C:\Users\mitadm.julia\packages\PyCall\BcTLp\src\pyeval.jl:38 =# @pysym(:PyEval_EvalCode), PyPtr, (PyPtr, PyPtr, PyPtr), o, globals, locals))))) <class 'ModuleNotFoundError'>
ModuleNotFoundError("No module named 'matlab'")
File "C:\Users\mitadm.julia\packages\PyCall\BcTLp\src\pyeval.jl", line 1, in
const Py_single_input = 256 # from Python.h

during initialization of module SharedMATLABEngine
in _handle_error at PyCall\BcTLp\src\exception.jl:83
in pyerr_check at PyCall\BcTLp\src\exception.jl:66
in pyerr_check at PyCall\BcTLp\src\exception.jl:62

Error from python
Traceback (most recent call last):
File "C:\work\matlab19bPy37\Lib\site-packages\matlab\engine_init_.py", line 45, in
pythonengine = importlib.import_module("matlabengineforpython"+PYTHONVERSION)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.2544.0_x64__qbz5n2kfra8p0\lib\importlib_init
.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1006, in _gcd_import
File "", line 983, in _find_and_load
File "", line 965, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'matlabengineforpython3_7'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\work\matlab19bPy37\Lib\site-packages\matlab\engine_init_.py", line 61, in
pythonengine = importlib.import_module("matlabengineforpython"+PYTHONVERSION)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.2544.0_x64__qbz5n2kfra8p0\lib\importlib_init
.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1006, in _gcd_import
File "", line 983, in _find_and_load
File "", line 967, in _find_and_load_unlocked
File "", line 670, in _load_unlocked
File "", line 583, in module_from_spec
File "", line 1043, in create_module
File "", line 219, in _call_with_frames_removed
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 "C:/Users/mitadm/PycharmProjects/pythonProject/main.py", line 25, in
import matlab.engine
File "C:\work\matlab19bPy37\Lib\site-packages\matlab\engine_init_.py", line 64, in
'MathWorks Technical Support for assistance: %s' % e)
OSError: Please reinstall MATLAB Engine for Python or contact MathWorks Technical Support for assistance: DLL load failed: The specified module could not be found.

Process finished with exit code 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions