Skip to content

Commit 28c753c

Browse files
Added help instructions to assit the user in installing the Pithon's yfinance library.
1 parent 09459cb commit 28c753c

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

toolbox/utilities/getFundamentals.m

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,16 @@
191191
try
192192
py.importlib.import_module('yfinance');
193193
catch
194-
error('FSDA:getFundamentals:MissingPackage', ...
195-
'Python package "yfinance" is not installed. Run: python.exe -m pip install yfinance');
194+
linkCmd = ['<a href="matlab:setupPythonEnv(''', ...
195+
'PipCommand'',''install yfinance'')">', ...
196+
'setupPythonEnv(''PipCommand'',''install yfinance'')', ...
197+
'</a>'];
198+
199+
error('FSDA:getFundamentals:MissingPackage', ...
200+
['Python package "yfinance" is not installed. Run from the terminal: python -m pip install yfinance or' ...
201+
newline 'call FSDA routine setupPythonEnv' ...
202+
newline 'with the following syntax: ' ...
203+
newline linkCmd]);
196204
end
197205

198206
n = numel(ticker);

0 commit comments

Comments
 (0)