Python interpreter became static and can't change it with PyVersion.

2 ビュー (過去 30 日間)
Ajpaezm
Ajpaezm 2021 年 4 月 1 日
編集済み: Meet 2024 年 12 月 24 日
As he title of the question says, the python interpreter I chose for my Matlab has become hardcoded. I know this is common for Linux and iOS, but not so sure for windows. Regardless, is there any routine I can follow up so I can "unstuck" the python interpreter version and use a new one each time this issue occurs?
Thanks in advance for any help you might have.

回答 (1 件)

Meet
Meet 2024 年 12 月 24 日
編集済み: Meet 2024 年 12 月 24 日
Hi Ajpaezm,
  1. Use the "pyenv" function to check the current Python environment and reset it if needed. You can reset the environment by restarting MATLAB or using the following command:
pyenv('Version', '');
2. Check that you set the desired Python version at the start of your MATLAB session before any Python commands are executed.
pyversion("Path_to_Python_Executable")
If the problem still persists, reinstall MATLAB to reset all configurations.
I hope this resolves the issue!

カテゴリ

Help Center および File ExchangeCall Python from MATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by