-
Notifications
You must be signed in to change notification settings - Fork 113
1_Installation
Yu Morishita edited this page Jul 14, 2020
·
17 revisions
LiCSBAS needs following modules in Python3.
- astropy
- beautifulsoup4
- matplotlib
- gdal
- h5py
- numpy
- requests
- statsmodels
One of the easiest ways to prepare the environment is installing Anaconda. Anaconda includes all required modules except gdal. After installing Anaconda, install gdal, e.g., by
conda install gdal
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 licsbas
will create and activate an "licsbas" environment (see also Managing environments).
To install Anaconda or Miniconda, pyenv is one of the easiest ways. If you are not familiar with configuring the python environment, just run the following commands in bash:
### Intall pyenv
git clone https://github.com/pyenv/pyenv.git ~/.pyenv
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
source ~/.bash_profile
### Intall miniconda and licsbas environment
pyenv install miniconda3-latest
pyenv shell miniconda3-latest
wget https://raw.githubusercontent.com/yumorishita/LiCSBAS/master/LiCSBAS.yml
conda env create -f LiCSBAS.yml
pyenv global miniconda3-latest/envs/licsbas
cd <your_LiCSBAS_path>
git clone https://github.com/yumorishita/LiCSBAS.git
Then,
source <your_LiCSBAS_path>/LiCSBAS/bashrc_LiCSBAS.sh
You may add the line above to your ~/.bashrc.