centreborelli / s2p

Satellite Stereo Pipeline
GNU Affero General Public License v3.0
208 stars 67 forks source link

Error While Installing on conda #63

Closed MiladGhorbaniG closed 4 years ago

MiladGhorbaniG commented 4 years ago

Hi, I just installed ubuntu 18 and installed miniconda and then followed installing the dependencies like gdal, etc. Using a virtual environment with python 3.6, when I ran pip install s2p or pip3 install s2p I get the following error:

pip3 install s2p
Collecting s2p
  Using cached s2p-1.0b23.tar.gz (2.6 MB)
Requirement already satisfied: numpy in ./miniconda3/envs/s2p/lib/python3.6/site-packages (from s2p) (1.19.2)
Requirement already satisfied: scipy in ./miniconda3/envs/s2p/lib/python3.6/site-packages (from s2p) (1.5.2)
Requirement already satisfied: rasterio[s3]>=1.0.14 in ./miniconda3/envs/s2p/lib/python3.6/site-packages (from s2p) (1.1.5)
Requirement already satisfied: utm in ./miniconda3/envs/s2p/lib/python3.6/site-packages (from s2p) (0.6.0)
Requirement already satisfied: pyproj>=2.0.2 in ./miniconda3/envs/s2p/lib/python3.6/site-packages (from s2p) (2.6.1.post1)
Requirement already satisfied: beautifulsoup4[lxml] in ./miniconda3/envs/s2p/lib/python3.6/site-packages (from s2p) (4.9.1)
Requirement already satisfied: plyfile in ./miniconda3/envs/s2p/lib/python3.6/site-packages (from s2p) (0.7.2)
Requirement already satisfied: ransac in ./miniconda3/envs/s2p/lib/python3.6/site-packages (from s2p) (1.0.2)
Requirement already satisfied: rpcm>=1.4.6 in ./miniconda3/envs/s2p/lib/python3.6/site-packages (from s2p) (1.4.6)
Requirement already satisfied: requests in ./miniconda3/envs/s2p/lib/python3.6/site-packages (from s2p) (2.24.0)
Requirement already satisfied: snuggs>=1.4.1 in ./miniconda3/envs/s2p/lib/python3.6/site-packages (from rasterio[s3]>=1.0.14->s2p) (1.4.7)
Requirement already satisfied: click<8,>=4.0 in ./miniconda3/envs/s2p/lib/python3.6/site-packages (from rasterio[s3]>=1.0.14->s2p) (7.1.2)
Requirement already satisfied: affine in ./miniconda3/envs/s2p/lib/python3.6/site-packages (from rasterio[s3]>=1.0.14->s2p) (2.3.0)
Requirement already satisfied: cligj>=0.5 in ./miniconda3/envs/s2p/lib/python3.6/site-packages (from rasterio[s3]>=1.0.14->s2p) (0.5.0)
Requirement already satisfied: attrs in ./miniconda3/envs/s2p/lib/python3.6/site-packages (from rasterio[s3]>=1.0.14->s2p) (20.2.0)
Requirement already satisfied: click-plugins in ./miniconda3/envs/s2p/lib/python3.6/site-packages (from rasterio[s3]>=1.0.14->s2p) (1.1.1)
Requirement already satisfied: boto3>=1.2.4; extra == "s3" in ./miniconda3/envs/s2p/lib/python3.6/site-packages (from rasterio[s3]>=1.0.14->s2p) (1.14.60)
Requirement already satisfied: soupsieve>1.2 in ./miniconda3/envs/s2p/lib/python3.6/site-packages (from beautifulsoup4[lxml]->s2p) (2.0.1)
Requirement already satisfied: lxml; extra == "lxml" in ./miniconda3/envs/s2p/lib/python3.6/site-packages (from beautifulsoup4[lxml]->s2p) (4.5.2)
Requirement already satisfied: geojson in ./miniconda3/envs/s2p/lib/python3.6/site-packages (from rpcm>=1.4.6->s2p) (2.5.0)
Requirement already satisfied: srtm4>=1.0.2 in ./miniconda3/envs/s2p/lib/python3.6/site-packages (from rpcm>=1.4.6->s2p) (1.1.4)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in ./miniconda3/envs/s2p/lib/python3.6/site-packages (from requests->s2p) (1.25.10)
Requirement already satisfied: idna<3,>=2.5 in ./miniconda3/envs/s2p/lib/python3.6/site-packages (from requests->s2p) (2.10)
Requirement already satisfied: certifi>=2017.4.17 in ./miniconda3/envs/s2p/lib/python3.6/site-packages (from requests->s2p) (2020.6.20)
Requirement already satisfied: chardet<4,>=3.0.2 in ./miniconda3/envs/s2p/lib/python3.6/site-packages (from requests->s2p) (3.0.4)
Requirement already satisfied: pyparsing>=2.1.6 in ./miniconda3/envs/s2p/lib/python3.6/site-packages (from snuggs>=1.4.1->rasterio[s3]>=1.0.14->s2p) (2.4.7)
Requirement already satisfied: botocore<1.18.0,>=1.17.60 in ./miniconda3/envs/s2p/lib/python3.6/site-packages (from boto3>=1.2.4; extra == "s3"->rasterio[s3]>=1.0.14->s2p) (1.17.60)
Requirement already satisfied: jmespath<1.0.0,>=0.7.1 in ./miniconda3/envs/s2p/lib/python3.6/site-packages (from boto3>=1.2.4; extra == "s3"->rasterio[s3]>=1.0.14->s2p) (0.10.0)
Requirement already satisfied: s3transfer<0.4.0,>=0.3.0 in ./miniconda3/envs/s2p/lib/python3.6/site-packages (from boto3>=1.2.4; extra == "s3"->rasterio[s3]>=1.0.14->s2p) (0.3.3)
Requirement already satisfied: filelock in ./miniconda3/envs/s2p/lib/python3.6/site-packages (from srtm4>=1.0.2->rpcm>=1.4.6->s2p) (3.0.12)
Requirement already satisfied: python-dateutil<3.0.0,>=2.1 in ./miniconda3/envs/s2p/lib/python3.6/site-packages (from botocore<1.18.0,>=1.17.60->boto3>=1.2.4; extra == "s3"->rasterio[s3]>=1.0.14->s2p) (2.8.1)
Requirement already satisfied: docutils<0.16,>=0.10 in ./miniconda3/envs/s2p/lib/python3.6/site-packages (from botocore<1.18.0,>=1.17.60->boto3>=1.2.4; extra == "s3"->rasterio[s3]>=1.0.14->s2p) (0.15.2)
Requirement already satisfied: six>=1.5 in ./miniconda3/envs/s2p/lib/python3.6/site-packages (from python-dateutil<3.0.0,>=2.1->botocore<1.18.0,>=1.17.60->boto3>=1.2.4; extra == "s3"->rasterio[s3]>=1.0.14->s2p) (1.15.0)
Building wheels for collected packages: s2p
  Building wheel for s2p (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/miladg/miniconda3/envs/s2p/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-b98r5kfe/s2p/setup.py'"'"'; __file__='"'"'/tmp/pip-install-b98r5kfe/s2p/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-yg8ulxnh
       cwd: /tmp/pip-install-b98r5kfe/s2p/
  Complete output (147 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib
  creating build/lib/s2p
  copying s2p/parallel.py -> build/lib/s2p
  copying s2p/geographiclib.py -> build/lib/s2p
  copying s2p/visualisation.py -> build/lib/s2p
  copying s2p/common.py -> build/lib/s2p
  copying s2p/pointing_accuracy.py -> build/lib/s2p
  copying s2p/ply.py -> build/lib/s2p
  copying s2p/sift.py -> build/lib/s2p
  copying s2p/initialization.py -> build/lib/s2p
  copying s2p/config.py -> build/lib/s2p
  copying s2p/estimation.py -> build/lib/s2p
  copying s2p/masking.py -> build/lib/s2p
  copying s2p/evaluation.py -> build/lib/s2p
  copying s2p/rpc_utils.py -> build/lib/s2p
  copying s2p/rasterization.py -> build/lib/s2p
  copying s2p/__init__.py -> build/lib/s2p
  copying s2p/triangulation.py -> build/lib/s2p
  copying s2p/cli.py -> build/lib/s2p
  copying s2p/rectification.py -> build/lib/s2p
  copying s2p/fusion.py -> build/lib/s2p
  copying s2p/block_matching.py -> build/lib/s2p
  make -j -C 3rdparty/homography
  make[1]: Entering directory '/tmp/pip-install-b98r5kfe/s2p/3rdparty/homography'
  g++ -march=native -O3 `gdal-config --cflags`   -c -o main.o main.cpp
  g++ -march=native -O3 `gdal-config --cflags`   -c -o LibImages/LibImages.o LibImages/LibImages.cpp
  g++ -march=native -O3 `gdal-config --cflags`   -c -o Utilities/Utilities.o Utilities/Utilities.cpp
  g++ -march=native -O3 `gdal-config --cflags`   -c -o Utilities/Memory.o Utilities/Memory.cpp
  g++ -march=native -O3 `gdal-config --cflags`   -c -o Utilities/Parameters.o Utilities/Parameters.cpp
  g++ -march=native -O3 `gdal-config --cflags`   -c -o Utilities/Time.o Utilities/Time.cpp
  g++ -march=native -O3 `gdal-config --cflags`   -c -o LibHomography/Homography.o LibHomography/Homography.cpp
  g++ -march=native -O3 `gdal-config --cflags`   -c -o LibHomography/Splines.o LibHomography/Splines.cpp
  g++  main.o LibImages/LibImages.o Utilities/Utilities.o Utilities/Memory.o Utilities/Parameters.o Utilities/Time.o LibHomography/Homography.o LibHomography/Splines.o  `gdal-config --libs` -o homography
  make[1]: Leaving directory '/tmp/pip-install-b98r5kfe/s2p/3rdparty/homography'
  cp 3rdparty/homography/homography bin
  make -j -C 3rdparty/sift/simd libsift4ctypes.so
  make[1]: Entering directory '/tmp/pip-install-b98r5kfe/s2p/3rdparty/sift/simd'
  g++ -march=native -O3 -fpic   -c -o LibImages/LibImages.o LibImages/LibImages.cpp
  g++ -march=native -O3 -fpic   -c -o LibSSE/LibSSE.o LibSSE/LibSSE.cpp
  g++ -march=native -O3 -fpic   -c -o LibSift/KeyPoint.o LibSift/KeyPoint.cpp
  g++ -march=native -O3 -fpic   -c -o LibSift/LibSift.o LibSift/LibSift.cpp
  g++ -march=native -O3 -fpic   -c -o LibSift/Octave.o LibSift/Octave.cpp
  g++ -march=native -O3 -fpic   -c -o LibSift/ScaleSpace.o LibSift/ScaleSpace.cpp
  g++ -march=native -O3 -fpic   -c -o Utilities/Memory.o Utilities/Memory.cpp
  g++ -march=native -O3 -fpic   -c -o Utilities/Parameters.o Utilities/Parameters.cpp
  g++ -march=native -O3 -fpic   -c -o Utilities/Time.o Utilities/Time.cpp
  g++ -march=native -O3 -fpic   -c -o Utilities/Utilities.o Utilities/Utilities.cpp
  g++ -march=native -O3 -fpic  -shared -o libsift4ctypes.so sift4ctypes.cpp LibImages/LibImages.o LibSSE/LibSSE.o LibSift/KeyPoint.o LibSift/LibSift.o LibSift/Octave.o LibSift/ScaleSpace.o Utilities/Memory.o Utilities/Parameters.o Utilities/Time.o Utilities/Utilities.o
  make[1]: Leaving directory '/tmp/pip-install-b98r5kfe/s2p/3rdparty/sift/simd'
  cp 3rdparty/sift/simd/libsift4ctypes.so lib
  make -C 3rdparty/mgm_multi
  make[1]: Entering directory '/tmp/pip-install-b98r5kfe/s2p/3rdparty/mgm_multi'
  cc -march=native -O3 -Iiio -c iio/iio.c -o iio.o
  g++ -march=native -O3 -fopenmp -Iiio  -c -o main_mgm_multi.o main_mgm_multi.cc
  g++ -march=native -O3 -fopenmp -Iiio  -c -o mgm_core.o mgm_core.cc
  g++ -march=native -O3 -fopenmp -Iiio  -c -o mgm_costvolume.o mgm_costvolume.cc
  g++ -march=native -O3 -fopenmp -Iiio  -c -o mgm_multiscale.o mgm_multiscale.cc
  g++ -march=native -O3 -fopenmp -Iiio  -c -o census_tools.o census_tools.cc
  g++ -march=native -O3 -fopenmp -Iiio  -c -o stereo_utils.o stereo_utils.cc
  g++ -march=native -O3 -fopenmp -Iiio  -c -o point.o point.cc
  cc -march=native -O3 -Iiio  -c -o shear.o shear.c
  g++ -march=native -O3 -fopenmp -Iiio  -c -o img.o img.cc
  g++               main_mgm_multi.o mgm_core.o mgm_costvolume.o mgm_multiscale.o census_tools.o stereo_utils.o point.o shear.o img.o iio.o -o mgm_multi -lfftw3 -lpng -ltiff -ljpeg -lm -fopenmp
  g++ -march=native -O3 -fopenmp -Iiio  -c -o main_mgm.o main_mgm.cc
  g++               main_mgm.o mgm_core.o mgm_costvolume.o mgm_multiscale.o census_tools.o stereo_utils.o point.o shear.o img.o iio.o -o mgm -lfftw3 -lpng -ltiff -ljpeg -lm -fopenmp
  rm mgm_multiscale.o stereo_utils.o mgm_costvolume.o mgm_core.o main_mgm_multi.o point.o main_mgm.o shear.o img.o census_tools.o
  make[1]: Leaving directory '/tmp/pip-install-b98r5kfe/s2p/3rdparty/mgm_multi'
  cp 3rdparty/mgm_multi/mgm       bin
  cp 3rdparty/mgm_multi/mgm_multi bin
  make -C 3rdparty/tvl1flow
  make[1]: Entering directory '/tmp/pip-install-b98r5kfe/s2p/3rdparty/tvl1flow'
  cc -march=native -O3 -fopenmp   -c -o iio.o iio.c
  cc -march=native -O3 -fopenmp -o tvl1flow main.c iio.o -lpng -ljpeg -ltiff -lm
  cc -march=native -O3 -fopenmp    backflow.c iio.o  -lpng -ljpeg -ltiff -lm -o backflow
  make[1]: Leaving directory '/tmp/pip-install-b98r5kfe/s2p/3rdparty/tvl1flow'
  cp 3rdparty/tvl1flow/tvl1flow bin
  cp 3rdparty/tvl1flow/callTVL1.sh bin
  make -C 3rdparty/lsd
  make[1]: Entering directory '/tmp/pip-install-b98r5kfe/s2p/3rdparty/lsd'
  cc -O3 -o lsd lsd_cmd.c lsd.c -lm
  cc -o lsd_call_example lsd_call_example.c lsd.c -lm
  make[1]: Leaving directory '/tmp/pip-install-b98r5kfe/s2p/3rdparty/lsd'
  cp 3rdparty/lsd/lsd bin
  cc -fpic -march=native -O3 -c c/iio.c -o c/iio.o
  cc -fpic -march=native -O3 -c c/downsa.c -o c/downsa.o
  cc c/downsa.o c/iio.o -o bin/downsa -lz -ltiff -lpng -ljpeg -lm
  cc -fpic -march=native -O3 -c c/backflow.c -o c/backflow.o
  cc c/backflow.o c/iio.o -o bin/backflow -lz -ltiff -lpng -ljpeg -lm
  cc -fpic -march=native -O3 -c c/qauto.c -o c/qauto.o
  cc c/qauto.o c/iio.o -o bin/qauto -lz -ltiff -lpng -ljpeg -lm
  cc -fpic -march=native -O3 -c c/morsi.c -o c/morsi.o
  cc c/morsi.o c/iio.o -o bin/morsi -lz -ltiff -lpng -ljpeg -lm
  cc -fpic -march=native -O3 -c c/cldmask.c -o c/cldmask.o
  cc c/cldmask.o c/iio.o -o bin/cldmask -lz -ltiff -lpng -ljpeg -lm
  cc -fpic -march=native -O3 -c c/remove_small_cc.c -o c/remove_small_cc.o
  cc c/remove_small_cc.o c/iio.o -o bin/remove_small_cc -lz -ltiff -lpng -ljpeg -lm
  cc -fpic -march=native -O3 -c c/plambda.c -o c/plambda.o
  cc c/plambda.o c/iio.o -o bin/plambda -lz -ltiff -lpng -ljpeg -lm
  cc -fpic -march=native -O3 -c c/pview.c -o c/pview.o
  cc c/pview.o c/iio.o -o bin/pview -lz -ltiff -lpng -ljpeg -lm
  cc -fpic -march=native -O3 -c c/morphoop.c -o c/morphoop.o
  cc c/morphoop.o c/iio.o -o bin/morphoop -lz -ltiff -lpng -ljpeg -lm
  cc -fpic -march=native -O3 -c c/plyextrema.c -o c/plyextrema.o
  cc c/plyextrema.o c/iio.o -o bin/plyextrema -lz -ltiff -lpng -ljpeg -lm
  cc -fpic -march=native -O3 -c c/colormesh.c -o c/colormesh.o
  cc -fpic -march=native -O3 -c c/rpc.c -o c/rpc.o
  g++ -fpic -march=native -O3 -c c/geographiclib_wrapper.cpp -o c/geographiclib_wrapper.o
  c/geographiclib_wrapper.cpp:3:10: fatal error: GeographicLib/GeoCoords.hpp: No such file or directory
   #include <GeographicLib/GeoCoords.hpp>
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  compilation terminated.
  makefile:109: recipe for target 'c/geographiclib_wrapper.o' failed
  make: *** [c/geographiclib_wrapper.o] Error 1
  rm c/pview.o c/qauto.o c/cldmask.o c/plyextrema.o c/plambda.o c/morphoop.o c/downsa.o c/backflow.o c/morsi.o c/remove_small_cc.o
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/tmp/pip-install-b98r5kfe/s2p/setup.py", line 76, in <module>
      """)
    File "/home/miladg/miniconda3/envs/s2p/lib/python3.6/site-packages/setuptools/__init__.py", line 163, in setup
      return distutils.core.setup(**attrs)
    File "/home/miladg/miniconda3/envs/s2p/lib/python3.6/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/home/miladg/miniconda3/envs/s2p/lib/python3.6/distutils/dist.py", line 955, in run_commands
      self.run_command(cmd)
    File "/home/miladg/miniconda3/envs/s2p/lib/python3.6/distutils/dist.py", line 974, in run_command
      cmd_obj.run()
    File "/home/miladg/miniconda3/envs/s2p/lib/python3.6/site-packages/wheel/bdist_wheel.py", line 290, in run
      self.run_command('build')
    File "/home/miladg/miniconda3/envs/s2p/lib/python3.6/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/home/miladg/miniconda3/envs/s2p/lib/python3.6/distutils/dist.py", line 974, in run_command
      cmd_obj.run()
    File "/home/miladg/miniconda3/envs/s2p/lib/python3.6/distutils/command/build.py", line 135, in run
      self.run_command(cmd_name)
    File "/home/miladg/miniconda3/envs/s2p/lib/python3.6/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/home/miladg/miniconda3/envs/s2p/lib/python3.6/distutils/dist.py", line 974, in run_command
      cmd_obj.run()
    File "/tmp/pip-install-b98r5kfe/s2p/setup.py", line 27, in run
      subprocess.check_call("make", shell=True)
    File "/home/miladg/miniconda3/envs/s2p/lib/python3.6/subprocess.py", line 311, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command 'make' returned non-zero exit status 2.
  ----------------------------------------
  ERROR: Failed building wheel for s2p
  Running setup.py clean for s2p
Failed to build s2p
DEPRECATION: Could not build wheels for s2p which do not use PEP 517. pip will fall back to legacy 'setup.py install' for these. pip 21.0 will remove support for this functionality. A possible replacement is to fix the wheel build issue reported above. You can find discussion regarding this at https://github.com/pypa/pip/issues/8368.
Installing collected packages: s2p
    Running setup.py install for s2p ... error
    ERROR: Command errored out with exit status 1:
     command: /home/miladg/miniconda3/envs/s2p/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-b98r5kfe/s2p/setup.py'"'"'; __file__='"'"'/tmp/pip-install-b98r5kfe/s2p/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-b67olnwm/install-record.txt --single-version-externally-managed --compile --install-headers /home/miladg/miniconda3/envs/s2p/include/python3.6m/s2p
         cwd: /tmp/pip-install-b98r5kfe/s2p/
    Complete output (91 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib
    creating build/lib/s2p
    copying s2p/parallel.py -> build/lib/s2p
    copying s2p/geographiclib.py -> build/lib/s2p
    copying s2p/visualisation.py -> build/lib/s2p
    copying s2p/common.py -> build/lib/s2p
    copying s2p/pointing_accuracy.py -> build/lib/s2p
    copying s2p/ply.py -> build/lib/s2p
    copying s2p/sift.py -> build/lib/s2p
    copying s2p/initialization.py -> build/lib/s2p
    copying s2p/config.py -> build/lib/s2p
    copying s2p/estimation.py -> build/lib/s2p
    copying s2p/masking.py -> build/lib/s2p
    copying s2p/evaluation.py -> build/lib/s2p
    copying s2p/rpc_utils.py -> build/lib/s2p
    copying s2p/rasterization.py -> build/lib/s2p
    copying s2p/__init__.py -> build/lib/s2p
    copying s2p/triangulation.py -> build/lib/s2p
    copying s2p/cli.py -> build/lib/s2p
    copying s2p/rectification.py -> build/lib/s2p
    copying s2p/fusion.py -> build/lib/s2p
    copying s2p/block_matching.py -> build/lib/s2p
    make -j -C 3rdparty/homography
    make[1]: Entering directory '/tmp/pip-install-b98r5kfe/s2p/3rdparty/homography'
    make[1]: 'homography' is up to date.
    make[1]: Leaving directory '/tmp/pip-install-b98r5kfe/s2p/3rdparty/homography'
    cp 3rdparty/homography/homography bin
    make -j -C 3rdparty/sift/simd libsift4ctypes.so
    make[1]: Entering directory '/tmp/pip-install-b98r5kfe/s2p/3rdparty/sift/simd'
    make[1]: 'libsift4ctypes.so' is up to date.
    make[1]: Leaving directory '/tmp/pip-install-b98r5kfe/s2p/3rdparty/sift/simd'
    cp 3rdparty/sift/simd/libsift4ctypes.so lib
    make -C 3rdparty/mgm_multi
    make[1]: Entering directory '/tmp/pip-install-b98r5kfe/s2p/3rdparty/mgm_multi'
    make[1]: Nothing to be done for 'all'.
    make[1]: Leaving directory '/tmp/pip-install-b98r5kfe/s2p/3rdparty/mgm_multi'
    cp 3rdparty/mgm_multi/mgm       bin
    cp 3rdparty/mgm_multi/mgm_multi bin
    make -C 3rdparty/tvl1flow
    make[1]: Entering directory '/tmp/pip-install-b98r5kfe/s2p/3rdparty/tvl1flow'
    make[1]: Nothing to be done for 'default'.
    make[1]: Leaving directory '/tmp/pip-install-b98r5kfe/s2p/3rdparty/tvl1flow'
    cp 3rdparty/tvl1flow/tvl1flow bin
    cp 3rdparty/tvl1flow/callTVL1.sh bin
    make -C 3rdparty/lsd
    make[1]: Entering directory '/tmp/pip-install-b98r5kfe/s2p/3rdparty/lsd'
    make[1]: Nothing to be done for 'all'.
    make[1]: Leaving directory '/tmp/pip-install-b98r5kfe/s2p/3rdparty/lsd'
    cp 3rdparty/lsd/lsd bin
    g++ -fpic -march=native -O3 -c c/geographiclib_wrapper.cpp -o c/geographiclib_wrapper.o
    c/geographiclib_wrapper.cpp:3:10: fatal error: GeographicLib/GeoCoords.hpp: No such file or directory
     #include <GeographicLib/GeoCoords.hpp>
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    compilation terminated.
    makefile:109: recipe for target 'c/geographiclib_wrapper.o' failed
    make: *** [c/geographiclib_wrapper.o] Error 1
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-b98r5kfe/s2p/setup.py", line 76, in <module>
        """)
      File "/home/miladg/miniconda3/envs/s2p/lib/python3.6/site-packages/setuptools/__init__.py", line 163, in setup
        return distutils.core.setup(**attrs)
      File "/home/miladg/miniconda3/envs/s2p/lib/python3.6/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/home/miladg/miniconda3/envs/s2p/lib/python3.6/distutils/dist.py", line 955, in run_commands
        self.run_command(cmd)
      File "/home/miladg/miniconda3/envs/s2p/lib/python3.6/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/home/miladg/miniconda3/envs/s2p/lib/python3.6/site-packages/setuptools/command/install.py", line 61, in run
        return orig.install.run(self)
      File "/home/miladg/miniconda3/envs/s2p/lib/python3.6/distutils/command/install.py", line 545, in run
        self.run_command('build')
      File "/home/miladg/miniconda3/envs/s2p/lib/python3.6/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/home/miladg/miniconda3/envs/s2p/lib/python3.6/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/home/miladg/miniconda3/envs/s2p/lib/python3.6/distutils/command/build.py", line 135, in run
        self.run_command(cmd_name)
      File "/home/miladg/miniconda3/envs/s2p/lib/python3.6/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/home/miladg/miniconda3/envs/s2p/lib/python3.6/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/tmp/pip-install-b98r5kfe/s2p/setup.py", line 27, in run
        subprocess.check_call("make", shell=True)
      File "/home/miladg/miniconda3/envs/s2p/lib/python3.6/subprocess.py", line 311, in check_call
        raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command 'make' returned non-zero exit status 2.
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/miladg/miniconda3/envs/s2p/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-b98r5kfe/s2p/setup.py'"'"'; __file__='"'"'/tmp/pip-install-b98r5kfe/s2p/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-b67olnwm/install-record.txt --single-version-externally-managed --compile --install-headers /home/miladg/miniconda3/envs/s2p/include/python3.6m/s2p Check the logs for full command output.

What is wrong?

carlodef commented 4 years ago

Hi @MiladGhorbaniG, you are missing geographiclib. You can install it on ubuntu with

sudo apt install libgeographic-dev

Alternatively, you can install s2p from sources to benefit from the latest version that doesn't require libgeographic-dev anymore:

sudo apt install build-essential geographiclib-tools libfftw3-dev libgeotiff-dev libtiff5-dev
git clone https://github.com/cmla/s2p.git --recursive
cd s2p
pip install .
MiladGhorbaniG commented 4 years ago

Thanks @carlodef. This solves it.