empty pyversion for python in Matlab. How to configure matlabprefs?

17 visualizaciones (últimos 30 días)
Anna Dunblad
Anna Dunblad el 12 de Feb. de 2019
Respondida: T.h. el 30 de Jun. de 2023
I'm running 64bits python 3.6 on Windows 10 and matlab R2018b, with python added to the path. pyversion is empty:
>> pyversion
version: ''
executable: ''
library: ''
home: ''
isloaded: 0
When I try to set the executable with
pyversion('C:/Users/myUser/AppData/Local/Programs/Python/Python36/python.exe')
I get the error
Error using pyversion
Path argument does not specify a valid executable.
I've looked at the following similar question and think this may be solved if I can manage to set the python preferences correctly in matlabprefs with setprefs, but cannot seem to get it right. What am I supposted to configure matlabprefs with? For email I've set preferences as below, looking for something in this format to allow Matlab to find the python executable.
setpref('Internet', 'E_mail', 'mail@my_mail.org');
setpref('Internet', 'SMTP_Server', 'my_relay');

Respuestas (2)

Omar Alfonso Cordova Carbajal
Omar Alfonso Cordova Carbajal el 17 de Jun. de 2021
I have the same problem. I see that I had python on 32 bits. I uninstall it and install it a 64 bit version and everything works

T.h.
T.h. el 30 de Jun. de 2023
I have the same problem. I uninstalled python and reinstalled it again after CLOSING the Matlab, then everything works.

Categorías

Más información sobre Startup and Shutdown en Help Center y File Exchange.

Productos


Versión

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by