Install Hmsc-HPC in a Python Virtual Environment on Windows
Source:R/Mod_Install_Hmsc.R
Install_Hmsc.Rd
This 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 string. Path to the Python executable.
- Path_VE
Character string. Path where the virtual environment will be created. This can not be an existing folder.
- URL_Hmsc
A character string for the Git repository (and branch name) of the
Hmsc-HPC
package.- URL_rdata
A character string for the Git repository (and branch name) of the
rdata
package. This is temporary to allowrdata
package to write rds file. In the near future, this functionality will be pushed to the main branch ofrdata
.- Force
Whether to force the installation of
Hmsc-HPC
; i.e. using--force-reinstall
as a suffix to thepip install
command
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
pip
in the virtual environmentInstalls the
Hmsc-HPC
package from the provided Git URLInstalls
TensorFlow
version 2.15Installs
rdata
Checks
TensorFlow
andHmsc-HPC
package installations