Installation#

Below is an example of how you can set up pyathena. It assumes that you have already installed miniconda or anaconda on your system.

  1. Clone the pyathena repo

    git clone https://github.com/jeonggyukim/pyathena.git
    
  2. Create an environment from the env.yml file

    conda update conda
    conda env create -f path_to_pyathena/env.yml
    
  3. Activate the pyathena environment

    conda activate pyathena
    
  4. Install pyathena

    pip install .
    

Sometimes yt and other installed packages (e.g., numpy) may have compatibility issues. In this case, you can downgrade packages to more stable, older versions. For example,

conda install -c conda-forge numpy=1.26.4

To update the existing pyathena environment with an updated env.yml file

conda activate pyathena
conda env update --file env.yml --prune

MPI setup for stellar Princeton cluster#

After setting up the environment as above,

# installing mpi4py on stellar
# https://researchcomputing.princeton.edu/support/knowledge-base/mpi4py
module load openmpi/gcc/4.1.0
export MPICC=$(which mpicc)
pip install mpi4py