How to use a pyenv-win virtual environment with Python Interface
Show older comments
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?
Accepted Answer
More Answers (0)
Categories
Find more on Call Python from MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!