Installation

py-electrostatic can be installed via pip. The package requires Python 3.8 or later.

Requirements

  • Python >= 3.8

  • NumPy

  • SciPy

  • ASE (Atomic Simulation Environment)

  • CellConstructor

  • Julia (optional but recommended for performance)

Basic Installation

Install from PyPI (when available):

pip install py-electrostatic

Or install from source:

git clone https://github.com/mesonepigreco/py-electrostatic.git
cd py-electrostatic
pip install -e .

Verification

Test your installation:

import pyelectrostatic
import pyelectrostatic.calculator as calc

# Check if Julia is available
print(calc.is_julia_available())  # Should print True if Julia is configured

Troubleshooting

Julia not found

If you get errors about Julia not being found:

  1. Make sure Julia is in your system PATH

  2. Try setting the JULIA_HOME environment variable

  3. Re-run julia.install()

Import errors

If you get import errors for CellConstructor:

pip install cellconstructor

For compilation issues with CellConstructor, you may need a Fortran compiler:

# Ubuntu/Debian
sudo apt-get install gfortran libblas-dev liblapack-dev

# macOS
brew install gcc

# Then reinstall cellconstructor
pip install --no-build-isolation --force-reinstall cellconstructor