Installation¶
Stable release¶
To install pygeons, run this command in your terminal:
$ pip install pygeons
This is the preferred method to install pygeons, as it will always install the most recent stable release.
If you don’t have pip installed, this Python installation guide can guide you through the process.
From sources¶
The sources for pygeons can be downloaded from the Github repo.
You can either clone the public repository:
$ git clone git://github.com/mpenkov/pygeons
Or download the tarball:
$ curl -OL https://github.com/mpenkov/pygeons/tarball/master
Once you have a copy of the source, you can install it with:
$ python setup.py install
Populating the Database¶
Pygeons requires data from GeoNames.org. This data is free for sharing and adaptations as long as you abide by the GeoNames license.
Pygeons includes scripts that download and import the data into a local sqlite3 DB. To download the data, run:
python -m pygeons.initialize
This will download approx. 500MB of data from geonames.org.
Once the data is imported, the database will live under .pygeons
in your home directory.
Use the PYGEONS_HOME
environment variable to modify this behavior.
The data takes several GB, so make sure you have enough space.