Purpose

REPLICATE ERIC'S ISSUES AND TRACK UPDATES TO SETUP & BUILD PROCESS.

 

I've started this page to keep track of how I'm trying to setup a fermitools development environment on my mac that includes fermipy,

The recipe below works, however it is extremely fragile.    Deviating from the recipe by changing the conda channels or the order of operations tends to cause it to break.

Setup
export PYTHON_VERSION=2.7
export FERMI_CONDA_ENV=fermitools-dev
export FERMI_CONDA_CHANNELS="-c conda-forge/label/cf201901 -c fermi"

conda create -y --name $FERMI_CONDA_ENV $CONDA_CHANNELS python=$PYTHON_VERSION
conda activate $FERMI_CONDA_ENV
conda install -y --name $FERMI_CONDA_ENV $FERMI_CONDA_CHANNELS --only-deps fermitools
conda install -y --name $FERMI_CONDA_ENV $FERMI_CONDA_CHANNELS fermi-repoman scons swig
repoman --remote-base https://github.com/fermi-lat checkout --force --develop ScienceTools FT_01-02-23_dev
git clone https://github.com/fermi-lat/Fermitools-conda.git 

 

 

Build fermitools
cd FT_01-02-23_dev
export PREFIX="$CONDA_PREFIX"
export CPU_COUNT=2
export RECIPE_DIR="/Users/echarles/glast/releases/Fermitools-conda"
source ../Fermitools-conda/build.sh

(Where i commented out the line Fermitools-conda/build.sh that calls repoman to redo the checkout)

 

Build fermipy
git clone https://github.com/fermiPy/fermipy.git
cd fermipy
export CONDA_DEPS='scipy matplotlib pyyaml numpy astropy gammapy healpy astropy-healpix'
conda install -y --name $FERMI_CONDA_ENV $FERMI_CONDA_CHANNELS -c $CONDA_CHANNELS $CONDA_DEPS
python setup.py develop
 
Test fermipy

py.test

 

Updates  

The recipe above worked at first but then started failing b/c it couldn't load the dylib libraries for the fermtiools packages.   The crazy thing about this is that the libraries are being made, and

are present in the /Users/echarles/anaconda2/envs/fermitools-dev/lib/fermitools area.   But for some reason importlib is not looking there when asked to import the libraries for the various gt apps.

I'm going to retry this process with including a conda-build step in the process.  Hopefully that gets the python setup up correctly.

The annoying thing about the conda-build process is that the build.sh script in Fermitools-conda wants to check out all the packages.  So I'm going to try and modify it to use the version in place.

 

 

 

 

  • No labels