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.
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
Directly install from the conda-forge
channel using conda
.
conda install -c conda-forge causalml
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)
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)
pip install causalml
pip install causalml[tf]
pip install -U numpy # this step is necessary to fix [#338](https://github.com/uber/causalml/issues/338)
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]