isce-framework / fringe

Fine Resolution InSAR With Generalized Eigenvectors (FRInGE)
Apache License 2.0
81 stars 42 forks source link

Anaconda environment (Linux, Ubuntu 18.04) - Installation #27

Open kleok opened 4 years ago

kleok commented 4 years ago

I am sharing the anaconda environment on Ubuntu 18.04 in which I was able to install successfully and use FRInGE functionalities. I hope this helps people on the installation phase of this package.

conda_fringe_environment_yml.txt conda_fringe_spec-file.txt

hardreddata commented 3 years ago

For reference I had issues with the build inside Anaconda complaining about not finding Python directories and I had to force it

CXX=${CXX} cmake -DCMAKE_INSTALL_PREFIX=../install ../src/fringe -DPython_INCLUDE_DIR=~/anaconda3/envs/insar/include/python3.6m -DPython_LIBRARY=~/anaconda3/envs/insar/lib/libpython3.6m.so -DPython_NumPy_INCLUDE_DIR=~/anaconda3/envs/insar/lib/python3.6/site-packages/numpy/core/include

It was tricky because the stated error Could NOT find Python (missing: Python_INCLUDE_DIRS was plural with the S which didn't work. I also couldn't set environment variables and proceed either.

https://cmake.org/cmake/help/v3.14/module/FindPython.html

I hope this helps someone.

rtburns-jpl commented 3 years ago

@RussellGrew, does using -DCMAKE_PREFIX_PATH=$CONDA_PREFIX help with finding Python and Numpy? That's what I usually use, and I haven't needed to specify any manual installation paths

hardreddata commented 3 years ago

See below.

Running Ubuntu via WSL2 though I am not sure it should make a difference.

 CXX=${CXX} cmake -DCMAKE_INSTALL_PREFIX=../install ../src/fringe -DCMAKE_PREFIX_PATH=$CONDA_PREFIX
-- The C compiler identification is GNU 7.3.0
-- The CXX compiler identification is GNU 7.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /home/russell/anaconda3/envs/insar/bin/x86_64-conda_cos6-linux-gnu-cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /home/russell/anaconda3/envs/insar/bin/x86_64-conda_cos6-linux-gnu-c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found GDAL: /home/russell/anaconda3/envs/insar/lib/libgdal.so (found suitable version "3.1.4", minimum required is "3.0")
-- Found Armadillo: /home/russell/anaconda3/envs/insar/include (found suitable version "9.900.4", minimum required is "8.100")
-- Found OpenMP_CXX: -fopenmp (found version "4.5")
-- Found OpenMP: TRUE (found version "4.5") found components: CXX
-- Looking for sgemm_
-- Looking for sgemm_ - not found
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Looking for sgemm_
-- Looking for sgemm_ - found
-- Found BLAS: /home/russell/anaconda3/envs/insar/lib/libblas.so
-- Looking for cheev_
-- Looking for cheev_ - found
-- Found LAPACK: /home/russell/anaconda3/envs/insar/lib/libblas.so;-lpthread;-lm;-ldl
-- Could NOT find Python (missing: Python_INCLUDE_DIRS Python_NumPy_INCLUDE_DIRS Development NumPy Development.Module Development.Embed) (found suitable version "3.8.5", minimum required is "3.7")
-- Found Python: /usr/bin/python3.8 (found suitable version "3.8.5", minimum required is "3.6") found components: Interpreter
-- Found Cython: /home/russell/anaconda3/envs/insar/bin/cython
CMake Error at /home/russell/anaconda3/envs/insar/share/cmake-3.19/Modules/FindPackageHandleStandardArgs.cmake:218 (message):
  Could NOT find Python (missing: Python_INCLUDE_DIRS Python_LIBRARIES
  Development Development.Module Development.Embed)
Call Stack (most recent call first):
  /home/russell/anaconda3/envs/insar/share/cmake-3.19/Modules/FindPackageHandleStandardArgs.cmake:582 (_FPHSA_FAILURE_MESSAGE)
  /home/russell/anaconda3/envs/insar/share/cmake-3.19/Modules/FindPython.cmake:470 (find_package_handle_standard_args)
  cmake/useCython.cmake:58 (find_package)
  CMakeLists.txt:43 (include)

-- Configuring incomplete, errors occurred!
See also "/home/russell/tools/fringe/build/CMakeFiles/CMakeOutput.log".
See also "/home/russell/tools/fringe/build/CMakeFiles/CMakeError.log".

CONDA_PREFIX is set and correct.

I also got a

CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!

and I think conda install make fixed it.

Thanks for taking an interest.

hardreddata commented 3 years ago

I think the image file is too small errors in http://earthdef.caltech.edu/boards/4/topics/2270 and http://earthdef.caltech.edu/boards/4/topics/2462 have come back.

I am running the latest versions of programs having recently prepared the environment.

gdal                      3.1.4            py36hdd67a42_0    conda-forge

Solved with

export RAW_CHECK_FILE_SIZE=NO