install the Python engine error message

조회 수: 12 (최근 30일)
alpedhuez
alpedhuez 2020년 7월 15일
댓글: Pierre Lacroix 2023년 5월 2일
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
>>

채택된 답변

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.
  댓글 수: 11
Kojiro Saito
Kojiro Saito 2020년 7월 18일
Yes, installation MATLAB engine to Python seems to be completed without an error.
Pierre Lacroix
Pierre Lacroix 2023년 5월 2일
Hello everyone,
I have the same Problem as @alpedhuez but when I try the solution of @Kojiro Saito:
>> cd (fullfile(matlabroot,'extern','engines','python'))
>> system('"C:\Program Files\Python38\python.exe" setup.py build -b C:\Temp install')
I received the following error message:
running build
running build_py
creating C:\Temp
creating C:\Temp\lib
creating 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
running install
running install_lib
copying C:\Temp\lib\matlab\engine\_arch.txt -> C:\Program Files\Python38\Lib\site-packages\matlab\engine
error: could not delete 'C:\Program Files\Python38\Lib\site-packages\matlab\engine\_arch.txt': Zugriff verweigert
ans =
1
P.S: I'm using Matlab R2022a and Python 3.8

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by