Installation

Prebuilt wheels are made available for Windows and Linux on PyPI. To install the latest version of IPhreeqcPy, simply run:

pip install IPhreeqcPy

If you want to install IPhreeqcPy in a specific location, you can specify the –prefix option:

pip install --install-option="--prefix=*YOUR INSTALL PATH*" --ignore-installed IPhreeqcPy

If you want to install a specific version of IPhreeqcPy, you can specify the version number:

pip install IPhreeqcPy==*version name*

To test the installation, run the following in a Python console:

import IPhreeqcPy
IPhreeqcPy.test()

To upgrade your current installation, run the following in a terminal:

pip install --upgrade IPhreeqcPy

To uninstall IPhreeqcPy, run the following in a terminal:

pip uninstall IPhreeqcPy

If you want to install IPhreeqcPy from source, you can clone the repository and run the following command:

windows

  • Install cmake which can be downloaded from https://cmake.org/. After installing make sure that path to cmake.exe is added to path in Environment variable otherwise you will get error cmake not found

  • Install visual studio 19 which can be downloaded from https://www.visualstudio.com/ or my preferred way is to install it through conda using following command

conda install -c conda-forge vs2019_win-64
  • After installing visual studio 2019 build IPhreeqcPy source using following command

python setup.py compile_phreeqc
  • Once phreeqc is compiled install IPhreeqcPy using following command

pip install IPhreeqcPy
  • If you want to install IPhreeqcPy in a specific location specify following additional directives

pip install --install-option="--prefix=*YOUR INSTALL PATH*" --ignore-installed IPhreeqcPy
  • Specific version available in PyPi can be installed using following directives

pip install IPhreeqcPy==*version name*
  • To test installation type following in python console

import IPhreeqcPy
IPhreeqcPy.test()
  • To upgrade your current installation type following in windows console

pip install --upgrade IPhreeqcPy
  • To uninstall IPhreeqcPy type following in windows console

pip uninstall IPhreeqcPy

Linux

  • First build IPhreeqcPy source using following command

python setup.py compile_phreeqc
  • Once phreeqc is compiled install IPhreeqcPy using following command

sudo pip install IPhreeqcPy
  • If you want to install IPhreeqcPy in a specific location specify following additional directives

pip install --install-option="--prefix=*YOUR INSTALL PATH*" --ignore-installed IPhreeqcPy
  • Specific version available in PyPi can be installed using following directives

pip install IPhreeqcPy==*version name*
  • To test installation type following in python console

IPhreeqcPy.test()
  • To upgrade your current installation type following in linux terminal

pip install --upgrade IPhreeqcPy
  • To uninstall IPhreeqcPy type following in linux terminal

pip uninstall IPhreeqcPy