Cannot find specified version with pyenv function
6 ビュー (過去 30 日間)
古いコメントを表示
I tried to use python in MATLAB with pyenv in Linux system. The Status initially is NotLoaded but everything else looks correct to me as shown below:
![1.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/247825/1.png)
Following the example, I typed pyenv('Version','2.7'), received following error:
![2.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/247826/2.png)
Status is still NotLoaded. I tried using py.list({'a','b'}), but received: "Unable to resolve the name py.list"
Linux doesn't have Pyenv from Github installed but has wrapper intepreter, executable and library. Works with PyCharm IDE.
0 件のコメント
回答 (1 件)
Meet
2024 年 12 月 11 日
Hi Yulin,
Specifying the Python version number to "pyenv" function only works on Windows platforms. On other platforms, such as Mac or Linux, you must specify the path to the executable. In this case, the command should look like this:
pyenv('Version', '/usr/local/pkg/python/2.7.10/bin/python2.7')
Hope this resolves your query!!
0 件のコメント
参考
カテゴリ
Help Center および 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!