Postgkyl installΒΆ
Shortcut
git clone https://github.com/ammarhakim/postgkyl.git
cd postgkyl
conda env create -f environment.yml
conda activate pgkyl
pip install -e .
Postgkyl installation can be split to two steps:
Setting up Python environment
Installing Postgkyl from its repository
The following Python packages are required:
adios2 [1]
click
matplotlib
msgpack-python
numpy
pytest
scipy
sympy
pytables
For installation and management of these dependencies we recommend the Conda package manager (more precisely the lightweight miniconda version).
Postgkyl requires Python 3.11 or higher
The python version of one of the dependencies, ADIOS 2, requires Python 3.11 or higher. Therefore, Postgkyl Conda packages are currently available only for these versions.
Users that installed Posgkyl prior to 2023/08/30 are advised to either create a fresh Python 3.11 environment or reinstall their Conda.
The packages can then be either installed manually or use the prepared environment.yml
in the Postgkyl repository. One needs to first clone the repository
git clone https://github.com/ammarhakim/postgkyl.git
navigate to the directory and create a new conda environment
conda env create -f environment.yml
The Postgkyl environment can then be activated using
conda activate pgkyl
and deactivate with
conda deactivate
Using Postgkyl with conda environments
Managing a significant number of dependencies can easily become very
complicated and conflicts may arise. Therefore, we generally recommend using
separate conda
environments for individual projects.
Note that in order to use environments, conda
needs to be initialized.
This is the last step of the conda installation, but the current default
behavior is _not_ to perform the initialization. It can be done afterwards
using conda init [shell name]
, e.g., conda init fish
with the
fantastic fish shell.
When creating a new environment for Postgkyl, one can easily rename it
conda env create -f environment.yml -n custom_name
Or, alternatively, simply try to update the current active environment
conda env update -f environment.yml
Finally, conda
can be used to install dependencies without the use of
environments
conda install --file requirements.txt
With the dependencies set up and the repository cloned, both the Postgkyl Python
module and the command line tool are installed using pip
pip install -e .
Note on using the PYTHOPATH
Assuming the Conda has been set properly, the pip
command above will
install both the Python module and the command line tool; no modification of
the PYTHOPATH
is required! In case Postgkyl was previously used with
PYTHONPATH
, we strongly recommend removing all entries from there.