Skip to Content
Mastering Geospatial Analysis with Python
book

Mastering Geospatial Analysis with Python

by Silas Toms, Paul Crickard, Eric van Rees
April 2018
Beginner to intermediate content levelBeginner to intermediate
440 pages
11h 36m
English
Packt Publishing
Content preview from Mastering Geospatial Analysis with Python

Installing psycopg2

Installing most Python libraries requires you to open your console and type:

pip install psycopg2

If that doesn't work, and you are using an Anaconda Python distribution, you can run the conda command, using:

conda install -c anaconda psycopg2

While most Python libraries can be downloaded and installed using:

python setup.py install

Since psycopg2 is more advanced than that and requires you to have a C compiler, Python header files, libpq header files, and the pg_config program. If you need to install psycopg2 from the source, the link to the instructions is in the following hint box.

To install psycopg2 from the source, the instructions are located at: http://initd.org/psycopg/docs/install.html#install-from-source
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learning Geospatial Analysis with Python

Learning Geospatial Analysis with Python

Joel Lawhead

Publisher Resources

ISBN: 9781788293334Supplemental Content