Local Installation of alphaMELTS
pyrolite can download and manage its own version of alphaMELTS (without any real
‘installation’, per-se), and use this for automation
purposes.
from pyrolite.util.log import stream_log
from pyrolite_meltsutil.download import install_melts
from pyrolite_meltsutil.util.general import pyrolite_meltsutil_datafolder
Here we can do a conditonal install - only downloading alphamelts if it doesnt exist:
if not (pyrolite_meltsutil_datafolder(subfolder="localinstall")).exists():
stream_log("pyrolite-meltsutil", level="INFO") # logger for output info
install_melts(local=True) # install a copy of melts to pyrolite data folder
Warning
This ‘local install’ method still requires that you have Perl installed,
as it uses the Perl run_alphamelts.command
script. If you’re on
Windows, you can use Strawberry Perl
for this purpose.
See also
Total running time of the script: (0 minutes 0.857 seconds)