Getting started



  • python 3 (>=3.7)

  • numpy

  • networkx

  • pandas

  • scipy

  • scikit-learn

  • statsmodels

  • pydot

(For visualization)

  • matplotlib

  • graphviz

  • pygraphviz (might not support the most recent Mac)

Install via PyPI

To use causal-learn, we could install it using pip:

(.venv) $ pip install causal-learn

Install from source

For development version, please kindly refer to our GitHub Repository.

Running examples

For search methods in causal discovery, there are various running examples in the ‘tests’ directory in our GitHub Repository, such as and

For the implemented modules, such as (conditional) independent test methods, we provide unit tests for the convenience of developing your own methods.


For the convenience of our community, CMU-CLeaR group maintains a list of benchmark datasets including real-world scenarios and various learning tasks. Please refer to the following links:

Please feel free to let us know if you have any recommendation regarding causal datasets with high-quality. We are grateful for any effort that benefits the development of causality community.


Team Leaders: Kun Zhang, Joseph Ramsey, Mingming Gong, Ruichu Cai, Shohei Shimizu, Peter Spirtes, Clark Glymour

Coordinators: Yujia Zheng, Biwei Huang, Wei Chen


Quality control: Yewen Fan, Haoyue Dai, Yujia Zheng, Ignavier Ng, Xiangchen Song


Please cite as:

  title={Causal-learn: Causal discovery in python},
  author={Zheng, Yujia and Huang, Biwei and Chen, Wei and Ramsey, Joseph and Gong, Mingming and Cai, Ruichu and Shimizu, Shohei and Spirtes, Peter and Zhang, Kun},
  journal={Journal of Machine Learning Research},