using PyEnv virtual environment MacOS

18 visualizaciones (últimos 30 días)
Michelle
Michelle el 2 de Abr. de 2025
Comentada: Adarsh el 4 de Abr. de 2025
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 comentario
Adarsh
Adarsh el 4 de Abr. de 2025
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.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Call Python from MATLAB en Help Center y File Exchange.

Productos


Versión

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by