how do I let matlab use a specific python3 version?
4 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I am running Ubuntu 18 and Matlab R2022b. My Ubuntu does not like to have a different default python3 than python3.6 (it then gives all kind of weird errors like not being able to start a terminal). Matlab R2022b does not support python3.6. I have python3.8 installed via deadsnakes/sudo apt-get install python3.8 and it works fine in the terminal (/usr/bin/python3.8). When I set this in Matlab via pyversion('/usr/bin/python3.8') it does not work. Any hints?
when I run pyversion I get:
pyversion
version: '3.8'
executable: '/usr/bin/python3.8'
library: ''
home: '/usr'
isloaded: 0
so library remains empty.
then when I run:
py.list({'This','is a','list'})
Unable to resolve the name 'py.list'.
Running pyversion('/usr/bin/python3') obviously gives the error 'Python version 3.6 is not supported.'
Running pyversion('/usr/bin/python2.7') results in a working environment:
pyversion
version: '2.7'
executable: '/usr/bin/python2.7'
library: 'libpython2.7.so.1.0'
home: '/usr'
isloaded: 0
but I need python3 instead! Any help?
0 Commenti
Risposta accettata
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Call Python from MATLAB in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!