What does the error, "fl:filesy​stem:Acces​sDenied" mean when trying to use Python?

조회 수: 30 (최근 30일)
I am trying to call Python from MATLAB, but whenever I run any Python commands, I get the error: fl:filesystem:AccessDenied
For example:
>> pyenv
fl:filesystem:AccessDenied
>> py.list({'This','is a','list'})
fl:filesystem:AccessDenied
I can't find any information about what this means.
I have Python 3.9 installed and I can call Python from the Windows command line.
  댓글 수: 3
Matt Butts
Matt Butts 2024년 4월 3일
I only have one MATLAB session open and I tried restarting my machine.I am also not getting anything additional for the error so I am not sure this is the same issue.
Matthias Schwaiger
Matthias Schwaiger 2025년 5월 12일
The same happens on my machine when editing simulink models (I do not use python). I use a separate prefdir and also a separate temp-folder for that Matlab instance only. Is there any way to see which file can not be accessed in order to track it down?

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

채택된 답변

Matt Butts
Matt Butts 2024년 4월 3일
I explicitly set the version to use and that resolved the issue.
>> pyenv(Version="C:\Users\gk874\AppData\Local\Programs\Python\Python39\pythonw.exe")
ans =
PythonEnvironment with properties:
Version: "3.9"
Executable: "C:\Users\gk874\AppData\Local\Programs\Python\Python39\pythonw.exe"
Library: "C:\Users\gk874\AppData\Local\Programs\Python\Python39\python39.dll"
Home: "C:\Users\gk874\AppData\Local\Programs\Python\Python39"
Status: NotLoaded
ExecutionMode: InProcess
To MathWorks Support, I think this error message could be greatly improved to help a user understand exactly what was happening. I expected MATLAB to find my Python installation directly, but that seems to not be the case.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Call Python from MATLAB에 대해 자세히 알아보기

태그

제품


릴리스

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by