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={Yujia Zheng and Biwei Huang and Wei Chen and Joseph Ramsey and Mingming Gong and Ruichu Cai and Shohei Shimizu and Peter Spirtes and Kun Zhang},
  journal={arXiv preprint arXiv:2307.16405},