How to use a pyenv-win virtual environment with Python Interface
Afficher commentaires plus anciens
I am using pyenv-win to manage Python projects that I will use in R2019b. I used the "pyenv" command to direct MATLAB to use the Python interpreter associated with my pyenv-win virtual environment, but I am getting an error when I try to run any Python commands from MATLAB.
>> pyenv('Version','C:\Users\username\.pyenv\pyenv-win\prj\test_prj\env\Scripts\python.exe')
ans =
PythonEnvironment with properties:
Version: "3.7"
Executable: "C:\Users\username\.pyenv\pyenv-win\prj\test_prj\env\Scripts\python.exe"
Library: "C:\Users\username\.pyenv\pyenv-win\shims\python37"
Home: "C:\Users\username\.pyenv\pyenv-win\prj\test_prj\env"
Status: NotLoaded
ExecutionMode: OutOfProcess
>> p = py.list
Unable to resolve the name py.list
How can I use a pyenv-win virtual environment with Python Interface?
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Call Python from MATLAB dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!