using PyEnv virtual environment MacOS

조회 수: 18 (최근 30일)
Michelle
Michelle 2025년 4월 2일
댓글: Adarsh 2025년 4월 4일
I manage my Python virtual environments with PyEnv (NOT the Matlab function). I have tried using this with the Matlab interface following the instruction found here: https://uk.mathworks.com/matlabcentral/answers/1750425-python-virtual-environments-with-matlab?requestedDomain=
but it's not working. See below:
>> pe = pyenv('Version', '/Users/myname/.pyenv/versions/analysis/bin/python','ExecutionMode', "OutOfProcess")
pe =
PythonEnvironment with properties:
Version: ""
Executable: ""
Library: ""
Home: ""
Status: NotLoaded
ExecutionMode: OutOfProcess
I'm using R2020a. Any ideas of why this may be? Thanks!
  댓글 수: 1
Adarsh
Adarsh 2025년 4월 4일
Can you please share the python version that you are using and also ensure that you are using the python version compatible to MATLAB, the list of python versions compatible with MATLAB are given in the documentation link below:
Also ensure that you are opening MATLAB from the same terminal where the virtual environment is activated.

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

답변 (0개)

카테고리

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

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by