Python API Setup: environments how to get Matlab to use other env as interpeter??
106 views (last 30 days)
Show older comments
Michael Epstein on 16 Feb 2017
Answered: Seth Wagenman on 24 Aug 2020
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!
Problem is --- I think they're in the same directory with diff shells,launchers, dll's,and etc. envirionment
Jon on 15 Aug 2017
On a Mac, use the Terminal and then
source activate nameof3.5environment
cd /Applications/MATLAB_R2017a.app/extern/engines/python [change to whatever version of Matlab you have]
python setup.py install --prefix="/Users/username/anaconda/"
Guojin Feng on 13 Sep 2017
Suppose Python is installed in the path "C:\ProgramData\Anaconda3\envs\py2" Try the command like this to specify the python executable.
Note that the specified executable is pythonw.exe
Seth Wagenman on 24 Aug 2020
Check this answer out if using Anaconda: https://www.mathworks.com/matlabcentral/answers/443558-matlab-crashes-when-using-conda-environment-other-than-base
Find more on Call Python from MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!