Installation
We use [conda](https://docs.conda.io/projects/conda/en/latest/user-guide/index.html) for managing our python environment.
Note: git commands must be run in a git bash terminal (or linux terminal) and python, conda, mamba, in a powershell terminal (or linux terminal).
Recommended step: install mamba in your base conda environment:
`python
conda install mamba
`
Create your conda environment (replace conda with mamba if installed):
`python
conda create -n myenvname openalea.mtg openalea.plantgl openalea.deploy openalea.lpy openalea.sconsx alinea.caribu alinea.astk numpy=1.22.4 pandas pytest sphinx sphinx-rtd-theme xlrd coverage nose statsmodels scipy=1.7.3 scons zipp=3.15.0 m2w64-gcc-fortran -c conda-forge -c openalea3
`
Convert CARIBU and Astk namespace in PEP 420. This step is required for installing other packages in the alinea namespace. To do so, you need to delete the __init__.py file in the alinea folder. For example, on a Windows computer, you could use this command:
`bash
del C:\Users\username\AppData\Local\miniconda3\envs\myenvname\Lib\site-packages\alinea.astk-2.3.2-py3.9.egg\alinea\__init__.py
del C:\Users\username\AppData\Local\miniconda3\envs\myenvname\Lib\site-packages\alinea.caribu-8.0.10-py3.9-win-amd64.egg\alinea\__init__.py
`
/!For all the following steps, run the commands inside the downloaded folders (commands after git clone).
Installation of Adel
git clone -b python3 https://github.com/rbarillot/adel
Convert the namespace package to PEP 420:
Delete the __init__.py in alinea folder
`bash del src/alinea/__init__.py `Replace the setup.py with setup_adel.py in plantfusion/installation_ressources. Rename it setup.py.
Installation : python setup.py develop
Installation of PyRATP. For this step, you need to have gcc, gfortran and make installed
Download the package: git clone -b update_mobidiv https://github.com/mwoussen/PyRATP
Installation:
`bash make mode=develop make clean `
Note: make will compile the fortran part, then run the package installation with pip.
Installation of WheatFspm
Create a WheatFspm folder and copy the clone_wheatfspm.sh and setup_wheatfspm.py files in it.
Run clone_wheatfspm.sh in a git bash terminal. This step will download all the wheatfspm submodules.
Rename setup_wheatfspm.py to setup.py and install the package with python setup.py develop
Installation of l-egume
Download the package: git clone -b Develop https://github.com/glouarn/l-egume
Install: python setup.py develop
Installation of LightVegeManager
Download the package: git clone https://github.com/mwoussen/lightvegemanager
Install: python setup.py develop
Installation of soil3ds
Download the package: git clone https://github.com/glouarn/soil3ds
Install: python setup.py develop
Installation of riri5
Download the package: git clone https://github.com/glouarn/riri5
Install: python setup.py develop