Skip to content

Instantly share code, notes, and snippets.

@ntessore
Last active April 15, 2021 15:56
Show Gist options
  • Save ntessore/3c6a64a1ca19e2b5598cfc883dc3ae05 to your computer and use it in GitHub Desktop.
Save ntessore/3c6a64a1ca19e2b5598cfc883dc3ae05 to your computer and use it in GitHub Desktop.
install FLASK in a conda environment
# create and activate a new environment for flask
conda create -n flask
conda activate flask
# switch to the root of the environment
cd $CONDA_PREFIX
# use ONLY conda-forge for packages
echo 'channels: [conda-forge]' > .condarc
# install the compilers package and dependencies
conda install compilers cfitsio gsl
# create a folder for non-package dependencies
mkdir opt
cd opt
# download and extract HEALPix 3.70
curl -OL https://downloads.sourceforge.net/project/healpix/Healpix_3.70/Healpix_3.70_2020Jul23.tar.gz
tar xf Healpix_3.70_2020Jul23.tar.gz
cd Healpix_3.70
# build libsharp (HEALPix dependency) and install into conda environment
cd src/common_libraries/libsharp/
./configure --prefix=$CONDA_PREFIX
make install
# build healpix_cxx and install into conda environment
cd ../../cxx
./configure --prefix=$CONDA_PREFIX
make install
# now download and extract FLASK wherever you want;
# in src/Makefile, set the following (look through
# the file, all of these are already set):
#
# COMP = $(CXX) $(CXXFLAGS) $(LDFLAGS) $(DEBUG)
#
# HEALDIR = $(CONDA_PREFIX)/opt/Healpix_3.70
# HEALDATA = $(HEALDIR)/data
# CXXHEAL = -I$(CONDA_PREFIX)/include/healpix_cxx
# LDHEAL =
#
# LIB1 =
# LIB2 =
#
# LIBHEALPIX = -lhealpix_cxx
# LIBSHARP = -lsharp
#
# then cd into src/ and make
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment