1

In a project I am currently working on, I use Python to display my current location, speed, etc. I now wanted to implement the reverse_geocoder library (https://github.com/thampiman/reverse-geocoder) to display some more info about my location. But it seems like that library doesn't like my RPi.

When I'm installing the lib using sudo pip install reverse_geocoder it spits out a long log which I'm not really able to comprehend:

Downloading/unpacking reverse-geocoder
Downloading reverse_geocoder-1.5.1.tar.gz (2.2MB): 2.2MB downloaded
Running setup.py (path:/tmp/pip-build-ewvRXl/reverse-geocoder/setup.py) egg_info for package reverse-geocoder
    Running from numpy source directory.
    /tmp/easy_install-7Rq980/numpy-1.13.3/setup.py:367: UserWarning: Unrecognized setuptools command, proceeding with generating Cython sources and expanding templates
    run_build = parse_setuppy_commands()
    /usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'python_requires'
    warnings.warn(msg)
    /tmp/easy_install-7Rq980/numpy-1.13.3/numpy/distutils/system_info.py:572: UserWarning:
        Atlas (http://math-atlas.sourceforge.net/) libraries not found.
        Directories to search for the libraries can be specified in the
        numpy/distutils/site.cfg file (section [atlas]) or by setting
        the ATLAS environment variable.
    self.calc_info()
    /tmp/easy_install-7Rq980/numpy-1.13.3/numpy/distutils/system_info.py:572: UserWarning:
        Blas (http://www.netlib.org/blas/) libraries not found.
        Directories to search for the libraries can be specified in the
        numpy/distutils/site.cfg file (section [blas]) or by setting
        the BLAS environment variable.
    self.calc_info()
    /tmp/easy_install-7Rq980/numpy-1.13.3/numpy/distutils/system_info.py:572: UserWarning:
        Blas (http://www.netlib.org/blas/) sources not found.
        Directories to search for the sources can be specified in the
        numpy/distutils/site.cfg file (section [blas_src]) or by setting
        the BLAS_SRC environment variable.
    self.calc_info()
    /bin/sh: 1: svnversion: not found
    /bin/sh: 1: svnversion: not found
    /tmp/easy_install-7Rq980/numpy-1.13.3/numpy/distutils/system_info.py:572: UserWarning:
        Lapack (http://www.netlib.org/lapack/) libraries not found.
        Directories to search for the libraries can be specified in the
        numpy/distutils/site.cfg file (section [lapack]) or by setting
        the LAPACK environment variable.
    self.calc_info()
    /tmp/easy_install-7Rq980/numpy-1.13.3/numpy/distutils/system_info.py:572: UserWarning:
        Lapack (http://www.netlib.org/lapack/) sources not found.
        Directories to search for the sources can be specified in the
        numpy/distutils/site.cfg file (section [lapack_src]) or by setting
        the LAPACK_SRC environment variable.
    self.calc_info()
    /usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'define_macros'
    warnings.warn(msg)
    non-existing path in 'numpy/distutils': 'site.cfg'
    Could not locate executable gfortran
    Could not locate executable f95
    Could not locate executable ifort
    Could not locate executable ifc
    Could not locate executable lf95
    Could not locate executable pgfortran
    Could not locate executable f90
    Could not locate executable f77
    Could not locate executable fort
    Could not locate executable efort
    Could not locate executable efc
    Could not locate executable g77
    Could not locate executable g95
    Could not locate executable pathf95
    don't know how to compile Fortran code on platform 'posix'
    _configtest.c:1:5: warning: conflicting types for built-in function ‘exp’
    int exp (void);
        ^

Did anyone else experience trouble with that library? Do you maybe have another solution for this?

To clarify: The output I wanted to get was along the lines of "You are in <city> (<country>)".

Update: To clarify why I use an offline lookup: I won't have a (reliable) internet connection for this device's use-case as it is mounted in a car and data transfer may end up eating away data plans and Germany data plans aren't that cheap. Also, Germanys wireless data infrastructure is mediocre at best so I'd rather rely on a local database to lookup my location than trying to ask an online API for that.

  • Unless these programs have a massive geographical database it seems likely that you need an internet connection. If that's the case why not just use a net based geographical API? – joan Dec 10 '17 at 10:39
  • The Pi will be installed into a car so it won't be able to connect to the net by default. Sure I could add a Wireless Hotspot and connect to it via WiFi but that would eat up my data plan at some point and in Germany (where I currently live) data volume is not that cheap. But I agree with you, an online solution would be much better. I previously developed an app on Windows Phone (UWP) and there I could use the Maps API which took advantage of downloaded maps so it would always query the local maps first where it could. – Raphael Guntersweiler Dec 11 '17 at 12:06
0

The README states that dependencies of this library are scipy and numpy. Install and configure those first.

  • I had to install scipy via apt (apt install python-scipy), numpy was installed before. Could that maybe be the problem? – Raphael Guntersweiler Dec 10 '17 at 1:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.