How to clear the Python environment on Windows
41 ビュー (過去 30 日間)
古いコメントを表示
Hi!
When running Python with MATLAB there is the command
pyenv
to set or change the python interpreter that MATLAB uses.
I'm developing code that should work with and without Python installed (but with reduced functionallity) and for testing purposes I need to unset/clear the environment so that it looks like Python is not installed. I.e. so that the PythonEnvironment is not populated. Uninstalling Python does not help.
So. Is there any good way to clear the fields of the PythonEnvironment returned by pyenv ?
BTW: I'm running MATLAB on Windows 10
0 件のコメント
回答 (1 件)
Vijay
2022 年 10 月 14 日
編集済み: Vijay
2022 年 10 月 14 日
Hello @Olav Queseth
you can edit the PATH environment variable of windows and remove the path that point to python executable.
This link demonstrates the addition of python to environment. You have to remove it. You can remove it just by clearing it.
参考
カテゴリ
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!