Python API Setup: environments how to get Matlab to use other env as interpeter??

61 ビュー (過去 30 日間)
Michael Epstein
Michael Epstein 2017 年 2 月 16 日
回答済み: Seth Wagenman 2020 年 8 月 24 日
Windows 10 64 bit 2016a Matlab Anaconda 3.6 Python (been using) installed 3.5 python Ananconda build for Matlab (py35) is the env. name ------------------------------------------------------- CAN'T FIGURE OUT HOW TO TELL MATLAB to use the py35 env I have an anaconda build of Python. root environment (default) is Python 3.6 no support Python 3.6 in Matlab.
So, what do I do? I install a new 3.5 anaconda python environment. but problem is keep running into.
How to tell Matlab to use the 3.5 environment!
pyversion
version: '3.6'
executable: '\Anaconda3\python.EXE'
library: '\Anaconda3\python36.dll'
home: '\Anaconda3'
isloaded: 0
Problem is --- I think they're in the same directory with diff shells,launchers, dll's,and etc. envirionment
  1 件のコメント
Jon
Jon 2017 年 8 月 15 日
On a Mac, use the Terminal and then
source activate nameof3.5environment
Then install.
cd /Applications/MATLAB_R2017a.app/extern/engines/python [change to whatever version of Matlab you have]
python setup.py install --prefix="/Users/username/anaconda/"

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

回答 (2 件)

Guojin Feng
Guojin Feng 2017 年 9 月 13 日
Suppose Python is installed in the path "C:\ProgramData\Anaconda3\envs\py2" Try the command like this to specify the python executable.
pyversion('C:\ProgramData\Anaconda3\envs\py2\pythonw.exe')
Note that the specified executable is pythonw.exe

Seth Wagenman
Seth Wagenman 2020 年 8 月 24 日

カテゴリ

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