Repository navigation
Expand file tree
/
Copy pathinstallPythonLibraries.m
More file actions
53 lines (41 loc) · 1.53 KB
/
Copy pathinstallPythonLibraries.m
File metadata and controls
53 lines (41 loc) · 1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
function installPythonLibraries()
%INSTALLPYTHONLIBRARIES Bootstrap pip in MATLAB Online and install workshop packages.
getPipUrl = "https://bootstrap.pypa.io/get-pip.py";
getPipFile = "get-pip.py";
fprintf("Downloading %s...\n", getPipFile);
websave(getPipFile, getPipUrl);
fprintf("Bootstrapping pip...\n");
status = system("python get-pip.py");
if status ~= 0
error("installPythonLibraries:BootstrapFailed", ...
"Failed to bootstrap pip with get-pip.py.");
end
fprintf("Installing CoolProp with pip...\n");
status = system("python -m pip install --user coolprop");
if status ~= 0
error("installPythonLibraries:InstallFailed", ...
"Failed to install CoolProp with pip.");
end
fprintf("CoolProp installation completed.\n");
fprintf("Installing nanobind with pip...\n");
status = system("python -m pip install --user nanobind");
if status ~= 0
error("installPythonLibraries:InstallFailed", ...
"Failed to install nanobind with pip.");
end
fprintf("nanobind installation completed.\n");
fprintf("Installing iapws with pip...\n");
status = system("python -m pip install --user iapws");
if status ~= 0
error("installPythonLibraries:InstallFailed", ...
"Failed to install iapws with pip.");
end
fprintf("iapws installation completed.\n");
fprintf("Installing pandas with pip...\n");
status = system("python -m pip install --user pandas");
if status ~= 0
error("installPythonLibraries:InstallFailed", ...
"Failed to install pandas with pip.");
end
fprintf("pandas installation completed.\n");
end