-
Notifications
You must be signed in to change notification settings - Fork 9
1_Installation
LiCSBAS2 uses following modules and versions in Python3. Other versions may also work, but not guaranteed.
- python=3.10.16
- astropy=6.1.3
- beautifulsoup4=4.12.3
- gdal=3.6.2
- h5py=3.12.1
- matplotlib=3.7.1
- numpy=1.26.4
- psutil=5.9.0
- requests=2.32.3
- shapely=2.0.6 (optional, only for LiCSBAS_contour.py)
- statsmodels=0.14.4
- cupy (if use GPU)
Otherwise you can use Miniconda (minimal installer for conda) and LiCSBAS.yml to install only the required modules. After installing Miniconda,
conda env create -f LiCSBAS.yml
conda activate licsbas2will create and activate an "licsbas2" environment (see also Managing environments).
If you have already created the virtual environment for LiCSBAS2, you can install the required modules using requirements.txt by:
conda install --file requirements.txt
To install Anaconda or Miniconda without being root, pyenv is one of the easiest ways. If you are not familiar with configuring the python environment, just run the following commands in bash:
### Install pyenv and pyenv-virtualenv
git clone https://github.com/pyenv/pyenv.git ~/.pyenv
git clone https://github.com/pyenv/pyenv-virtualenv.git ~/.pyenv/plugins/pyenv-virtualenv
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile
echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.bash_profile
echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.bash_profile
source ~/.bash_profile
### Install miniconda and licsbas environment
pyenv install miniconda3-latest
pyenv shell miniconda3-latest
wget https://raw.githubusercontent.com/yumorishita/LiCSBAS2/master/LiCSBAS.yml
conda env create -f LiCSBAS.yml
pyenv global miniconda3-latest/envs/licsbas2cd <your_LiCSBAS_path>
git clone https://github.com/yumorishita/LiCSBAS2.gitThen,
source <your_LiCSBAS_path>/LiCSBAS2/bashrc_LiCSBAS.shYou may add the line above to your ~/.bashrc or ~/.bash_profile.
To check if the install is OK or not, run:
LiCSBAS_check_install.pyIf LiCSBAS install is OK is displayed at the bottom line, the install is OK.