I want call python3.4 from the matlab. The default version is python2.7, when I run pyversion in matlab, it shows :
version: \'2.7\'
executable: \'/usr/bi
I ran into a similar issue (R2015b, Ubuntu) and did not solve it with the accepted answer. I had to execute
python3 MATLABROOT/toolbox/matlab/external/interfaces/python/+python/+internal/pyinfo.py
without modifying it from the command line to make it work.
Just so happened to have the same issue within 5 days of this post.
Apparently matlab uses the following script to search for the library:
MATLABROOT/toolbox/matlab/external/interfaces/python/+python/+internal/pyinfo.py
where MATLABROOT is something you chose when you installed matlab.
Theoretically, you could edit pyinfo.py to include '/usr/lib/x86_64-linux-gnu' in its search. For example, by appending one more method to the search locations that just returns '/usr/lib/x86_64-linux-gnu'. But I don't know what the licensing/legal/warranty ramifications of this would be, so use at your own discretion.
Run python:
>>> import sys
>>> print(sys.executable)
Copy the answer and use it in Matlab as follow:
>> pyversion('C:\Users\84757\AppData\Local\Programs\Python\Python38\python.exe');