Quickstart guide

Installation with pip

The simplest way to install PySCF is via the Python Package Index (PyPI), which provides a precompiled PySCF code (Python wheel) that works on most Linux systems, macOS systems, and Ubuntu subsystems on Windows 10:

$ pip install pyscf

If you already have pyscf installed, you can upgrade it to the newest version:

$ pip install --upgrade pyscf


PySCF requires a BLAS library, which is typically detected automatically. If a BLAS library exists but wasn’t detected or an undesired BLAS library was detected, you can specify the BLAS library in one of two ways:

  • use the LDFLAGS environment variable:
    $ LDFLAGS="-L/path/to/blas -lblas" pip install pyscf
  • use the PYSCF_INC_DIR environment variable:
    $ PYSCF_INC_DIR="/path/to/blas:/path/to/other/lib" pip install pyscf


The pyscf.dft module requires the exchange-correlation functional library Libxc, which is not yet available in the PyPI repository. To enable the pyscf.dft module, Libxc can be downloaded and manually compiled using the --enable-shared flag. The path to Libxc must be provided in the PYSCF_INC_DIR environment variable before installing PySCF, e.g.

$ PYSCF_INC_DIR="/path/to/libxc" pip install pyscf 

Installation with conda

PySCF can be installed using the conda package manager (available separately or as a part of the Anaconda Python distribution):

$ conda install -c pyscf pyscf

Docker image

PySCF is available as a Docker image. For browser-based use, you can start a container with a Jupyter notebook server listening for HTTP connections on port 8888,

$ docker run -it -p 8888:8888 pyscf/pyscf-1.5.0

and then visit https://localhost:8888 with your browser in order to use PySCF in a notebook.

Alternatively, you can use Docker to enable PySCF in an IPython shell:

$ docker run -it pyscf/pyscf-1.5.0 start.sh ipython

Manual installation from source

To manually install PySCF from source available in the GitHub repo, see the detailed instructions available here.