Error using pyversion, Too many input arguments.
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I want to create CoolProp in my MATLAB interface. for this, I installed Python 3.11 for window 11. After that i opened MATLAB 2023a and I typed in my MATLAB Command window: pyversion C:\Users\ASUS\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Python 3.11\python.exe
I am getting: Error using pyversion, Too many input arguments.
can anyone help me for executing the above?
thank yoy in advace for your valuable suggesion.
0 Kommentare
Antworten (2)
Fangjun Jiang
am 29 Feb. 2024
Bearbeitet: Fangjun Jiang
am 29 Feb. 2024
Might be the white space in the folder name? Try
pyversion("C:\Users\ASUS\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Python 3.11\python.exe")
pyversion('C:\Users\ASUS\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Python 3.11\python.exe')
By the way, it is recommended to use pyenv
2 Kommentare
Fangjun Jiang
am 1 Mär. 2024
Verschoben: Fangjun Jiang
am 1 Mär. 2024
If you look at the file under C:\Users\ASUS\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Python 3.11\, they are most likely "short cut" file, not executable. Please locate the actual .exe file.
Mike Croucher
am 29 Feb. 2024
Bearbeitet: Mike Croucher
am 29 Feb. 2024
Hi Mukesh
The pyversion command is no longer recommended. See the doc at (Not recommended) Change default version of Python interpreter - MATLAB pyversion - MathWorks United Kingdom.
It is better to use pyenv instead Change default environment of Python interpreter - MATLAB pyenv - MathWorks United Kingdom
Try this
pyenv(Version="C:\Users\ASUS\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Python 3.11\python.exe")
Siehe auch
Kategorien
Mehr zu Call Python from MATLAB finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!