Skip to content

Latest commit

 

History

History
97 lines (64 loc) · 2.74 KB

installation.rst

File metadata and controls

97 lines (64 loc) · 2.74 KB

Installation

Installation with conda is recommended.

conda environment files for Python 3.7, 3.8 and 3.9 are available in the repository. To use models under the inference.tf module (e.g. DragonNet), additional dependency of tensorflow is required. For detailed instructions, see below.

Install using conda:

Install conda with:

wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh -b
source miniconda3/bin/activate
conda init
source ~/.bashrc

Install from conda-forge

Directly install from the conda-forge channel using conda.

conda install -c conda-forge causalml

Install from the conda virtual environment

This will create a new conda virtual environment named causalml-[tf-]py3x, where x is in [7, 8, 9]. e.g. causalml-py37 or causalml-tf-py38. If you want to change the name of the environment, update the relevant YAML file in envs/.

git clone https://github.com/uber/causalml.git
cd causalml/envs/
conda env create -f environment-py38.yml    # for the virtual environment with Python 3.8 and CausalML
conda activate causalml-py38
(causalml-py38)

Install causalml with tensorflow

git clone https://github.com/uber/causalml.git
cd causalml/envs/
conda env create -f environment-tf-py38.yml # for the virtual environment with Python 3.8 and CausalML
conda activate causalml-tf-py38
(causalml-tf-py38) pip install -U numpy                     # this step is necessary to fix [#338](https://github.com/uber/causalml/issues/338)

Install from PyPI:

pip install causalml

Install causalml with tensorflow

pip install causalml[tf]
pip install -U numpy                            # this step is necessary to fix [#338](https://github.com/uber/causalml/issues/338)

Install from source:

Create a clean conda environment.

Then:

git clone https://github.com/uber/causalml.git
cd causalml
pip install .
python setup.py build_ext --inplace

with tensorflow:

pip install .[tf]