MATLAB Answers

install the Python engine error message

조회 수: 53(최근 30일)
alpedhuez
alpedhuez 15 Jul 2020
댓글: Kojiro Saito 18 Jul 2020
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 16 Jul 2020
편집: Kojiro Saito 17 Jul 2020
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 17 Jul 2020
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 17 Jul 2020
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 18 Jul 2020
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