MATLAB Answers

install the Python engine error message

55 ビュー (過去 30 日間)
alpedhuez
alpedhuez 2020 年 7 月 15 日
コメント済み: Kojiro Saito 2020 年 7 月 18 日
I go the following error message. What to do?
>> cd (fullfile(matlabroot,'extern','engines','python'))
>> system('python setup.py install')
'python' is not recognized as an internal or external command,
operable program or batch file.
ans =
1.00
>>

  0 件のコメント

サインインしてコメントする。

採用された回答

Kojiro Saito
Kojiro Saito 2020 年 7 月 16 日
編集済み: Kojiro Saito 2020 年 7 月 17 日
Please make sure that you have downloaded 64bit Python installer from https://www.python.org/downloads/.
Supported Python versions are listed in here. As of R2020a, 2.7, 3.6 and 3.7 are supported.
After installation is complete, please make sure you have added the install folder (for example, C:\Program Files\Python\Python38) to environment variable PATH as described in this document.

  10 件のコメント

表示 7 件の古いコメント
Kojiro Saito
Kojiro Saito 2020 年 7 月 17 日
It seems that you don't have a write permission to MATLAB_INSTALL\extern\engines\python folder, so setup.py fails creating build folder inside this.
You can change the build folder by adding "build -b SOME\PATH" option.
system('C:\Python37\python.exe setup.py build -b C:\Temp install')
alpedhuez
alpedhuez 2020 年 7 月 17 日
Thank you. Does this mean that it worked? What does it mean?
>> system('C:\Python37\python.exe setup.py build -b C:\Temp install ')
running build
running build_py
creating C:\Temp\lib
creating C:\Temp\lib\matlab
copying dist\matlab\mlarray.py -> C:\Temp\lib\matlab
copying dist\matlab\mlexceptions.py -> C:\Temp\lib\matlab
copying dist\matlab\__init__.py -> C:\Temp\lib\matlab
creating C:\Temp\lib\matlab\engine
copying dist\matlab\engine\basefuture.py -> C:\Temp\lib\matlab\engine
copying dist\matlab\engine\engineerror.py -> C:\Temp\lib\matlab\engine
copying dist\matlab\engine\enginehelper.py -> C:\Temp\lib\matlab\engine
copying dist\matlab\engine\enginesession.py -> C:\Temp\lib\matlab\engine
copying dist\matlab\engine\fevalfuture.py -> C:\Temp\lib\matlab\engine
copying dist\matlab\engine\futureresult.py -> C:\Temp\lib\matlab\engine
copying dist\matlab\engine\matlabengine.py -> C:\Temp\lib\matlab\engine
copying dist\matlab\engine\matlabfuture.py -> C:\Temp\lib\matlab\engine
copying dist\matlab\engine\__init__.py -> C:\Temp\lib\matlab\engine
creating C:\Temp\lib\matlab\_internal
copying dist\matlab\_internal\mlarray_sequence.py -> C:\Temp\lib\matlab\_internal
copying dist\matlab\_internal\mlarray_utils.py -> C:\Temp\lib\matlab\_internal
copying dist\matlab\_internal\__init__.py -> C:\Temp\lib\matlab\_internal
running install
running install_lib
creating C:\Python37\Lib\site-packages\matlab
creating C:\Python37\Lib\site-packages\matlab\engine
copying C:\Temp\lib\matlab\engine\basefuture.py -> C:\Python37\Lib\site-packages\matlab\engine
copying C:\Temp\lib\matlab\engine\engineerror.py -> C:\Python37\Lib\site-packages\matlab\engine
copying C:\Temp\lib\matlab\engine\enginehelper.py -> C:\Python37\Lib\site-packages\matlab\engine
copying C:\Temp\lib\matlab\engine\enginesession.py -> C:\Python37\Lib\site-packages\matlab\engine
copying C:\Temp\lib\matlab\engine\fevalfuture.py -> C:\Python37\Lib\site-packages\matlab\engine
copying C:\Temp\lib\matlab\engine\futureresult.py -> C:\Python37\Lib\site-packages\matlab\engine
copying C:\Temp\lib\matlab\engine\matlabengine.py -> C:\Python37\Lib\site-packages\matlab\engine
copying C:\Temp\lib\matlab\engine\matlabfuture.py -> C:\Python37\Lib\site-packages\matlab\engine
copying C:\Temp\lib\matlab\engine\_arch.txt -> C:\Python37\Lib\site-packages\matlab\engine
copying C:\Temp\lib\matlab\engine\__init__.py -> C:\Python37\Lib\site-packages\matlab\engine
copying C:\Temp\lib\matlab\mlarray.py -> C:\Python37\Lib\site-packages\matlab
copying C:\Temp\lib\matlab\mlexceptions.py -> C:\Python37\Lib\site-packages\matlab
creating C:\Python37\Lib\site-packages\matlab\_internal
copying C:\Temp\lib\matlab\_internal\mlarray_sequence.py -> C:\Python37\Lib\site-packages\matlab\_internal
copying C:\Temp\lib\matlab\_internal\mlarray_utils.py -> C:\Python37\Lib\site-packages\matlab\_internal
copying C:\Temp\lib\matlab\_internal\__init__.py -> C:\Python37\Lib\site-packages\matlab\_internal
copying C:\Temp\lib\matlab\__init__.py -> C:\Python37\Lib\site-packages\matlab
byte-compiling C:\Python37\Lib\site-packages\matlab\engine\basefuture.py to basefuture.cpython-37.pyc
byte-compiling C:\Python37\Lib\site-packages\matlab\engine\engineerror.py to engineerror.cpython-37.pyc
byte-compiling C:\Python37\Lib\site-packages\matlab\engine\enginehelper.py to enginehelper.cpython-37.pyc
byte-compiling C:\Python37\Lib\site-packages\matlab\engine\enginesession.py to enginesession.cpython-37.pyc
byte-compiling C:\Python37\Lib\site-packages\matlab\engine\fevalfuture.py to fevalfuture.cpython-37.pyc
byte-compiling C:\Python37\Lib\site-packages\matlab\engine\futureresult.py to futureresult.cpython-37.pyc
byte-compiling C:\Python37\Lib\site-packages\matlab\engine\matlabengine.py to matlabengine.cpython-37.pyc
byte-compiling C:\Python37\Lib\site-packages\matlab\engine\matlabfuture.py to matlabfuture.cpython-37.pyc
byte-compiling C:\Python37\Lib\site-packages\matlab\engine\__init__.py to __init__.cpython-37.pyc
byte-compiling C:\Python37\Lib\site-packages\matlab\mlarray.py to mlarray.cpython-37.pyc
byte-compiling C:\Python37\Lib\site-packages\matlab\mlexceptions.py to mlexceptions.cpython-37.pyc
byte-compiling C:\Python37\Lib\site-packages\matlab\_internal\mlarray_sequence.py to mlarray_sequence.cpython-37.pyc
byte-compiling C:\Python37\Lib\site-packages\matlab\_internal\mlarray_utils.py to mlarray_utils.cpython-37.pyc
byte-compiling C:\Python37\Lib\site-packages\matlab\_internal\__init__.py to __init__.cpython-37.pyc
byte-compiling C:\Python37\Lib\site-packages\matlab\__init__.py to __init__.cpython-37.pyc
running install_egg_info
Writing C:\Python37\Lib\site-packages\matlabengineforpython-R2020a-py3.7.egg-info
ans =
0
>>
Kojiro Saito
Kojiro Saito 2020 年 7 月 18 日
Yes, installation MATLAB engine to Python seems to be completed without an error.

サインインしてコメントする。

その他の回答 (0 件)

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by