Repository navigation
Installing PAOFLOW
PAOFLOW is a Python package for constructing and operating on Hamiltonians derived from projections of DFT wavefunctions on atomic orbital bases.
The current code base supports:
- Python 3.10 or newer
- Linux / POSIX environments
For most users, installation is straightforward with pip. For development work or MPI-heavy workflows, a Conda-based environment is usually the safest option.
PAOFLOW currently requires:
python --versionUse Python 3.10 or later.
A Conda-based distribution is recommended, especially if you need mpi4py linked cleanly against your system MPI libraries:
PAOFLOW depends on mpi4py, so a working MPI setup is part of a healthy installation.
If you are using Conda or Mamba, install mpi4py there first:
conda install mpi4pyIf your system already has a compatible MPI implementation such as OpenMPI or MPICH, pip also works:
pip install mpi4pympi4py needs to link against the MPI libraries available on your machine. If MPI is misconfigured, PAOFLOW may install but fail at runtime.
This is the simplest route if you just want to use PAOFLOW:
pip install PAOFLOWThis installs the core package and its main dependencies.
If you already cloned the repository and want to install from source:
pip install .If you do not have administrator privileges:
pip install --user .This is the standard manual installation path from the repository root.
If you plan to modify the source code and want changes to be picked up without reinstalling every time:
pip install -e .[dev]This installs PAOFLOW in editable mode together with the development dependencies.
Note: even with an editable install, you still need to restart your Python interpreter or Jupyter kernel after code changes.
PAOFLOW defines several optional feature groups. Install them by appending the extra name in brackets.
| Extra | What it adds | Install command |
|---|---|---|
weyl_search |
z2pack, tbmodels
|
pip install PAOFLOW[weyl_search] |
graphics |
vtk, matplotlib
|
pip install PAOFLOW[graphics] |
transport |
pyyaml, psutil, pydantic
|
pip install PAOFLOW[transport] |
pyskeaf |
scikit-image, shapely, joblib, pandas
|
pip install PAOFLOW[pyskeaf] |
fast |
numba |
pip install PAOFLOW[fast] |
dev |
pre-commit, pytest
|
pip install PAOFLOW[dev] |
You can combine extras in a single command:
pip install PAOFLOW[pyskeaf,fast]This is useful if you want a richer installation without pulling in every optional dependency.
Good for general use:
pip install PAOFLOWGood if you want tests and local development tools:
pip install -e .[dev]Useful if you need plotting or graphical post-processing:
pip install PAOFLOW[graphics]Useful if you want optional JIT acceleration:
pip install PAOFLOW[fast]Useful if you need the transport-related dependencies:
pip install PAOFLOW[transport]If you want several capabilities together:
pip install PAOFLOW[graphics,transport,pyskeaf,fast]If you want a clean and reproducible install, this is a good starting point:
conda create -n paoflow python=3.10
conda activate paoflow
conda install mpi4py
pip install PAOFLOWFor development:
conda create -n paoflow-dev python=3.10
conda activate paoflow-dev
conda install mpi4py
pip install -e .[dev]This avoids many of the MPI-related issues that can happen in mixed system environments.
After installation, check that PAOFLOW imports correctly:
python -c "import PAOFLOW; print('PAOFLOW import OK')"If you installed the pyskeaf extra, a command-line tool should also be available:
pyskeaf --helpIf that command is not found, make sure the pyskeaf extra was installed in the same environment you are currently using.
The current package metadata declares these main dependencies for the base install:
numpyscipympi4pypandas
These are installed automatically when you install PAOFLOW through pip.
The dev extra currently installs:
pre-commitpytest
A typical developer setup is:
pip install -e .[dev]
pre-commit install
pytestEditable mode updates Python imports to point at your working tree, but running sessions still cache imported code. Restart the interpreter or notebook kernel after changes.
If mpi4py fails to build or import:
- Make sure an MPI implementation is installed on your system.
- Prefer installing
mpi4pyvia Conda:conda install mpi4py
- Reinstall PAOFLOW in the same environment.
If pip install succeeds but python cannot import PAOFLOW, you are likely using different environments for pip and python.
Use:
which python
which pip
python -m pip install PAOFLOWUsing python -m pip is often safer than calling pip directly.
If pyskeaf --help fails:
- confirm that you installed the
pyskeafextra - confirm that your shell is using the same environment where PAOFLOW was installed
pip install PAOFLOWpip install .pip install -e .[dev]pip install PAOFLOW[graphics,transport]conda install mpi4pyFor most users, the recommended path is:
- create or activate a Python 3.10+ environment
- ensure
mpi4pyis installed cleanly - install PAOFLOW with
pip - add extras only as needed
If you are developing PAOFLOW, use an editable install with the dev extra and restart your interpreter after source changes.