using PyEnv virtual environment MacOS

19 vues (au cours des 30 derniers jours)
Michelle
Michelle le 2 Avr 2025
Commenté : Adarsh le 4 Avr 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 commentaire
Adarsh
Adarsh le 4 Avr 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.

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Call Python from MATLAB dans Help Center et File Exchange

Produits


Version

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by