Installation¶
pyamgx has been tested only on Linux, though it should be possible to install on Windows as well.
Requirements¶
Before installing pyamgx, you should ensure the following software packages are installed:
The AMGX library. The distributed (MPI) version of AMGX is not required.
Python 2 >= 2.7 or Python 3 >= 3.5. If you are using Python 2 < 2.7.9, you will need to install pip.
Python libraries SciPy and Cython. It is highly recommended to use pip to install these packages:
$ pip install scipy cython
If you are using the Anaconda distribution, these packages should already be installed.
Building and installing pyamgx¶
Get the source code¶
Download the pyamgx source either by visiting https://github.com/shwina/pyamgx and clicking “Clone or Download”, or if you have Git, running the following command:
$ git clone https://github.com/shwina/pyamgx
Set environment variables¶
Before installing pyamgx, you should export the following environment variables:
AMGX_DIR
: Path to the AMGX project root directoryAMGX_BUILD_DIR
: If AMGX was built in a directory other than$AMGX_DIR/build
, setAMGX_BUILD_DIR
to that directory. Otherwise, you don’t need to set this variable
On bash, the commands to set the above environment variables are:
$ export AMGX_DIR=/path/to/.../AMGX
$ export AMGX_BUILD_DIR=/path/to/.../build
Install pyamgx¶
$ cd pyamgx
$ pip install .