Create conda environment for preciso
Goal
For new users and easy deployment on remote machines, we should use conda so we won't have :
- Python version conflict
- dependencies versions conflicts
- necessity to install git, especially on windows
Method
In a file called environment.yml
, put :
name: python-preciso
channels:
- anaconda
dependencies:
- python=3.7
- numpy
- pandas
- matplotlib
- scipy
- jinja2
To install conda on Linux
Only if you don't have Anaconda or Miniconda installed. See https://docs.conda.io/projects/conda/en/latest/user-guide/install/index.html
# install conda
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh -b
eval "$(/home/<user>/miniconda3/bin/conda shell.<shell I use> hook)" ## adapt "user" and "shell i use" (bash, zsh, fish,...)
conda init
It should display (base)
before the terminal's prompt... ?
Create the env.
# create my conda env
conda env create -f environment.yml
conda activate python-preciso
Then :
conda install -c anaconda git ## Only if user has not git installed
git clone https://framagit.org/arnall/preciso.git
cd preciso
pip3 install -e .
Using PreciSo
It will be only available after activating the env, via conda activate python-preciso
.
Edited by Arnaud