How to use a pyenv-win virtual environment with Python Interface
显示 更早的评论
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?
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Call Python from MATLAB 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!