Install Hmsc-HPC in a python virtual environment on Windows
Source:R/Mod_Install_Hmsc.R
Install_Hmsc.RdThis function sets up a Python virtual environment and installs the
Hmsc-HPC package from a specified
Git repository. It also installs TensorFlow and performs checks to to
verify the installation of Python, the virtual environment, and the packages.
Usage
Install_Hmsc(
Path_Python,
Path_VE,
URL_Hmsc = "https://github.com/trossi/hmsc-hpc.git@simplify-io",
URL_rdata = "https://github.com/trossi/rdata.git@test-for-hmsc-v2",
Force = FALSE
)Arguments
- Path_Python
Character. Path to the Python executable.
- Path_VE
Character. Path where the virtual environment will be created. This can not be an existing folder.
- URL_Hmsc
Character. URL of the Git repository (and branch name) of the
Hmsc-HPCpackage.- URL_rdata
Character. URL of the Git repository (and branch name) of the
rdatapackage. This is temporary to allowrdatapackage to write rds file. In the near future, this functionality will be pushed to the main branch ofrdata.- Force
Logical. Whether to force the installation of
Hmsc-HPC; i.e. using--force-reinstallas a suffix to thepip installcommand
Details
The function performs the following steps:
Checks if the virtual environment directory already exists and stops with an error if it does
Verifies the Python version and installation
Creates a new Python virtual environment
Upgrades
pipin the virtual environmentInstalls the
Hmsc-HPCpackage from the provided Git URLInstalls
TensorFlowversion 2.15Installs
rdataChecks
TensorFlowandHmsc-HPCpackage installations