Installing GPSTk in Anaconda Python

GPSTk 2.10 Python examples require installing GPSTk for Python. GPSTk 2.10 requires Python 2.7.

Install GPSTk for Python

  1. Use Anaconda to switch to Python 2.7 by
   conda create -n py27 python=2.7
   conda activate py27
   conda install matplotlib
  1. install minimal prereqs
   apt install g++ make cmake swig
  1. Download gpstk source
   git clone --depth 1
   cd GPSTk
  1. Build & install. This takes several minutes, and emits a very large number of C++11 deprecation warnings
   ./ -ue

Test GPSTk Python

  1. get the example code
   git clone
  1. try the examples like:

GPSTk Example 1


If you get an error like

CMake Error at swig/PythonSetup.cmake:45 (string): string sub-command REGEX, mode MATCH needs at least 5 arguments total to command.

Create a file GPSTk/swig/CustomPythonSetup.cmake with contents (assuming python in ~/anaconda2)

    CACHE FILEPATH "File Path to system python shared object library" )
     CACHE PATH "Directory Path to system python includes" )