@@ -19,11 +19,11 @@ function setupPythonEnv(varargin)
1919% pip action such as 'install', 'uninstall', 'list' or
2020% 'show', and contains a single token only, it is
2121% interpreted as a package name and automatically expanded
22- % to 'install <package>'.
23- % Example - 'PipCommand','install yfinance'
24- % Example - 'PipCommand','yfinance'
22+ % to 'install <package>'. In other words you can use both
23+ % 'PipCommand','install yfinance' or 'PipCommand',' yfinance'
24+ % Example - 'PipCommand','uninstall yfinance -y '
2525% Data Types - char | string
26- %
26+ %
2727% Verbose : Logical scalar which controls the display of diagnostic
2828% messages.
2929% Default is true.
@@ -252,6 +252,7 @@ function setupPythonEnv(varargin)
252252 disp(' Xcode Status: Installed (activating system dependencies bypass).' );
253253 end
254254
255+
255256 [valid_path , python_exists ] = find_compatible_python(paths ,m_rel ,true );
256257
257258 if ~python_exists
@@ -290,7 +291,10 @@ function setupPythonEnv(varargin)
290291 fallback = " " ;
291292else
292293 [~ , cmdout ] = system(' /bin/zsh -lc "which -a python3 python3.13 2>/dev/null"' );
294+ pythonEnv = pyenv ;
295+ pythonUserPath= [' \n ' char(pythonEnv .Executable)];
293296 fallback = sprintf([' \n /opt/homebrew/bin/python3' ...
297+ pythonUserPath ...
294298 ' \n /opt/homebrew/bin/python3.13' ...
295299 ' \n /usr/local/bin/python3' ...
296300 ' \n /Library/Frameworks/Python.framework/Versions/3.13/bin/python3.13' ]);
0 commit comments