Skip to content
This repository has been archived by the owner on Jun 14, 2021. It is now read-only.

Installation

alexprengere edited this page Mar 11, 2013 · 5 revisions

Installation instructions are also described in the site.

Prerequisites

These prerequisites are very standard packages which are often installed by default on Linux distributions. But make sure you have them anyway.

First you need to install setuptools (as root):

$ apt-get install python-setuptools    # for debian
$ yum install python-setuptools.noarch # for fedora

Then you need some basics compilation stuff to compile dependencies (also as root):

$ apt-get install python-dev g++    # for debian
$ yum install python-devel gcc-c++  # for fedora

From PyPI

You can install it from PyPI:

$ easy_install --user -U GeoBases

There is a development version also on PyPI:

$ easy_install --user -U GeoBasesDev

From Github

You can clone the project from github:

$ git clone https://github.com/opentraveldata/geobases.git

Then install the package and its dependencies:

$ cd geobases
$ python setup.py install --user # for user space

Final steps

A script is put in ~/.local/bin, to be able to use it, put that in your ~/.bashrc or ~/.zshrc:

export PATH=$PATH:$HOME/.local/bin
export BACKGROUND_COLOR=black # or 'white', your call

If you use zsh and want to have awesome autocomplete for the main script, add this to your ~/.zshrc:

# Add custom completion scripts
fpath=(~/.zsh/completion $fpath)
autoload -U compinit
compinit

Python 3 support

There is Python 3 support, you can try it by changing branch before installation. Install setuptools and python3-dev as prerequisites, then:

$ git checkout 3000
$ python3 setup.py install --user

You can also install the package from PyPI:

$ easy_install-3.2 --user -U GeoBases3K

Windows support

After version 4.23, the command line tool should work on Windows. You can clone the repository using GitHub for Windows, then use tools -> open a shell here to open a shell in the cloned sources.

Then you can install it like this, for example with Python 2.6:

> C:\Python26\python.exe .\setup.py install
> C:\Python26\scripts\GeoBase -h

If you have trouble compiling the dependencies, you can try switching to the pypy branch, who only has pure python dependencies.

Now you can read the Quickstart or directly go to the [[Python examples]] and the Command line examples!