Why do I receive a "subprocess-exited-with-error" error message when installing "matlabengine"?
显示 更早的评论
Does someone have a fix for this?
>pip install matlabengine
Collecting matlabengine
Using cached matlabengine-9.15.2.tar.gz (18 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: matlabengine
Building wheel for matlabengine (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for matlabengine (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [56 lines of output]
running bdist_wheel
running build
running build_py
_get_engine_ver_major_minor returned: ('9', '15')
_get_engine_ver_major_minor returned: ('9', '15')
Traceback (most recent call last):
File "C:\Users\<username>\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
main()
File "C:\Users\<username>\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\<username>\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 251, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\<username>\AppData\Local\Temp\pip-build-env-5xd8bphw\overlay\Lib\site-packages\setuptools\build_meta.py", line 434, in build_wheel
return self._build_with_temp_dir(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\<username>\AppData\Local\Temp\pip-build-env-5xd8bphw\overlay\Lib\site-packages\setuptools\build_meta.py", line 419, in _build_with_temp_dir
self.run_setup()
File "C:\Users\<username>\AppData\Local\Temp\pip-build-env-5xd8bphw\overlay\Lib\site-packages\setuptools\build_meta.py", line 341, in run_setup
exec(code, locals())
File "<string>", line 415, in <module>
File "C:\Users\<username>\AppData\Local\Temp\pip-build-env-5xd8bphw\overlay\Lib\site-packages\setuptools\__init__.py", line 103, in setup
return distutils.core.setup(**attrs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\<username>\AppData\Local\Temp\pip-build-env-5xd8bphw\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 185, in setup
return run_commands(dist)
^^^^^^^^^^^^^^^^^^
File "C:\Users\<username>\AppData\Local\Temp\pip-build-env-5xd8bphw\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 201, in run_commands
dist.run_commands()
File "C:\Users\<username>\AppData\Local\Temp\pip-build-env-5xd8bphw\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 969, in run_commands
self.run_command(cmd)
File "C:\Users\<username>\AppData\Local\Temp\pip-build-env-5xd8bphw\overlay\Lib\site-packages\setuptools\dist.py", line 989, in run_command
super().run_command(command)
File "C:\Users\<username>\AppData\Local\Temp\pip-build-env-5xd8bphw\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
cmd_obj.run()
File "C:\Users\<username>\AppData\Local\Temp\pip-build-env-5xd8bphw\overlay\Lib\site-packages\wheel\bdist_wheel.py", line 364, in run
self.run_command("build")
File "C:\Users\<username>\AppData\Local\Temp\pip-build-env-5xd8bphw\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "C:\Users\<username>\AppData\Local\Temp\pip-build-env-5xd8bphw\overlay\Lib\site-packages\setuptools\dist.py", line 989, in run_command
super().run_command(command)
File "C:\Users\<username>\AppData\Local\Temp\pip-build-env-5xd8bphw\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
cmd_obj.run()
File "C:\Users\<username>\AppData\Local\Temp\pip-build-env-5xd8bphw\overlay\Lib\site-packages\setuptools\_distutils\command\build.py", line 131, in run
self.run_command(cmd_name)
File "C:\Users\<username>\AppData\Local\Temp\pip-build-env-5xd8bphw\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "C:\Users\<username>\AppData\Local\Temp\pip-build-env-5xd8bphw\overlay\Lib\site-packages\setuptools\dist.py", line 989, in run_command
super().run_command(command)
File "C:\Users\<username>\AppData\Local\Temp\pip-build-env-5xd8bphw\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
cmd_obj.run()
File "<string>", line 381, in run
File "<string>", line 217, in get_matlab_root_from_windows_reg
File "<string>", line 260, in _find_matlab_key_from_windows_registry
RuntimeError: No compatible MATLAB installation found in Windows Registry. This release of MATLAB Engine API for Python is compatible with version 9.15. The found versions were 9.14.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for matlabengine
Failed to build matlabengine
ERROR: Could not build wheels for matlabengine, which is required to install pyproject.toml-based projects
1 个评论
Harald
2023-9-22
Hi,
far down the error stack, it tells the underlying problem:
This release of MATLAB Engine API for Python is compatible with version 9.15. The found versions were 9.14.
Best wishes,
Harald
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Call MATLAB from Python 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!