opentraveldata / geobases

Data services and visualization
http://opentraveldata.github.com/geobases/
Other
193 stars 41 forks source link

Installation on MacOS Python 3.6 virtualenv fails #25

Closed da115115 closed 6 years ago

da115115 commented 7 years ago

On MacOS X 10.12.4 (Sierra), in a Python3 virtualenv, the installation of GeoBases and GeoBasesDev both fail. The following reproduces the error.

(venv36) [user@MacBook-Pro ~]$ pip install -U GeoBasesDev
Collecting GeoBasesDev
  Downloading GeoBasesDev-5.0.0.zip (11.0MB)
    100% |████████████████████████████████| 11.0MB 98kB/s 
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/lw/gsthkwb52055rmk66g944wyh0000gn/T/pip-build-_rg5z140/GeoBasesDev/setup.py", line 49, in <module>
        print >> stderr, '/!\ Installing without "%s"' % \
    TypeError: unsupported operand type(s) for >>: 'builtin_function_or_method' and '_io.TextIOWrapper'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/lw/gsthkwb52055rmk66g944wyh0000gn/T/pip-build-_rg5z140/GeoBasesDev/
dnul commented 6 years ago

try pip install GeoBases3K

alexprengere commented 6 years ago

Indeed in GeoBases there are different branches for the different Python versions, leading to different package names. For the record, a few years ago, when I needed to deploy GeoBases on Hadoop and had trouble with the C-based dependencies, I decided to create a very lightweight version called NeoBase. I only ported the core API, removed all dependencies and unified all branches and all files in a single one, compatible with all Python versions from 2.6. Obviously lots of features are missing (everything around visualization), and only the optd data is supported as a data source. But this actually covers all my needs 95% of the time. Moreover, some custom code has been added specifically for the optd data (like it does not load deprecated airports), that would not have been possible with GeoBases which aimed at being a more general tool supporting many data sources. As a result, I think the load time is about 5 times faster, the tests are better overall since there are custom tests for optd, and the data is usually more up to date, simply because I use that one more.

So alternatively, you can give it a try with pip install neobase.