Calling python using system function
2 ビュー (過去 30 日間)
古いコメントを表示
I try to run "python -V" using the system function.
[flag, cmdout] = system('python -V');
However, the flag returns an error of 9009.
Typing "Python -V" directly into the command prompt returns the Python version, so Python is already installed and passed through.
Is it not possible to use the system function to call "Python XX"?
I am using MATLAB 2020b, Python3.6.0
0 件のコメント
採用された回答
the cyclist
2021 年 1 月 25 日
Sounds like a path issue. Type
pwd
in MATLAB to get your directory, and then go to that directory on the command line and try
which python
I'm guessing you'll get "python not found".
その他の回答 (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!