We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent afc951d commit 6b65e9cCopy full SHA for 6b65e9c
+stdlib/python_version.m
@@ -1,6 +1,8 @@
1
%% PYTHON_VERSION get the Python version used by MATLAB
2
%
3
-% uses persistent variable to cache the Python version
+% uses persistent variable to cache the Python version.
4
+% If the environment changes, the cached version will be invalid.
5
+% this cache is cleared by "clear stdlib.python_version"
6
7
%%% Inputs
8
% * force_old: (optional) boolean flag to force checking of Python on Matlab < R2022a
@@ -43,9 +45,7 @@
43
45
msg = e.message;
44
46
end
47
-% cache the result
-if ~isempty(v)
48
- stdlib_py_version = v;
49
-end
+% cache the result - even if empty -- because the check takes up to 1000 ms say on HPC
+stdlib_py_version = v;
50
51
0 commit comments