Matlab on OSX can't find Python3

6 ビュー (過去 30 日間)
Ben
Ben 2015 年 9 月 9 日
コメント済み: Ben 2015 年 9 月 9 日
In Matlab 2014b, I have a call to a Python 3 script using the "system" function. This works fine on 2015a/Windows, but on OSX, I get an error "python3: command not found". Typing "python3" in the OSX terminal works fine, and temporarily calling python2 via just "python" also works (but Python stuff breaks, of course). I did notice that there are a few versions of Python 2.x in /usr/bin, but no Python 3.x.
  1 件のコメント
Ben
Ben 2015 年 9 月 9 日
Figured out the problem: the call to system was using "python myscript.py ...", and the system was dutifully calling the OS's default Python. Changed everything to python3 after changing Matlab's default Python version and things work fine.

サインインしてコメントする。

回答 (0 件)

カテゴリ

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