How to Install the Basemap and the GEOS Library?

  • Context: Python 
  • Thread starter Thread starter ecastro
  • Start date Start date
  • Tags Tags
    install Python
Click For Summary

Discussion Overview

The discussion revolves around the installation process of the Basemap and GEOS library in Python, specifically for a user operating on Windows 10 with Python 3.6.1. Participants seek clarification on various steps of the installation procedure, including prerequisite requirements and environment variable settings.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Homework-related

Main Points Raised

  • One participant expresses confusion about the installation steps, particularly regarding the "PROJ4" requirement and the correct usage of the command prompt for setting environment variables.
  • Another participant suggests that the angle brackets and quotes should not be included when setting the environment variable for GEOS_DIR.
  • A different participant points out that the 'export' command is not recognized in Windows, indicating that it is a Linux command and suggesting the use of a Scientific Python Distribution like Anaconda instead.
  • There is uncertainty about how to verify if the GEOS library is already installed on the system.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the installation steps, as there are differing views on the correct commands to use in Windows versus Linux, and uncertainty remains regarding the installation of the GEOS library.

Contextual Notes

Limitations include the lack of clarity on the specific requirements for Windows users and the potential need for a compiler, which may not be addressed in the provided installation guide.

ecastro
Messages
249
Reaction score
8
I have been following this procedure on installing the basemap and the GEOS library: https://matplotlib.org/basemap/users/installing.html

I have searched through other alternatives, but they seem to provide the same procedure. I need help on understanding the "Installation" process. I am using Python 3.6.1 on Windows 10.
 
Technology news on Phys.org
ecastro said:
I have been following this procedure on installing the basemap and the GEOS library: https://matplotlib.org/basemap/users/installing.html

I have searched through other alternatives, but they seem to provide the same procedure. I need help on understanding the "Installation" process. I am using Python 3.6.1 on Windows 10.
Which part are you having trouble with?
 
I have trouble specifically on the third step, but I am not sure.

I have 'matplotlib' and 'numpy' installed in my Python, but I don't know how to install the 'PROJ4' item under the requirements (however, I did not see this item on other references), so I am not sure if I am already done on the first step of the 'Installation' process, i.e. "Install pre-requisite requirements.". I had downloaded the basemap-tar file and extracted it, and I guess the "cd to the basemap-X.Y.Z directory" means that I need to open a command prompt inside the directory of the basemap folder. The third step says "Install the GEOS library", but I don't know how. The step shows that I need the command prompt to be go inside the 'geos-3.3.3' folder, which I did and then 'export GEOS_DIR=</usr/local/>', but the command prompt doesn't seem to process this line, it just says that the syntax of the command is incorrect.
 
ecastro said:
then 'export GEOS_DIR=</usr/local/>'
I don't believe you're supposed to type the angle brackets or the quotes.

Install the GEOS library. If you already have it on your system, just set the environment variable GEOS_DIR to point to the location of libgeos_c and geos_c.h (if libgeos_c is in /usr/local/lib and geos_c.h is in /usr/local/include, set GEOS_DIR to /usr/local). Then go to next step. If you don’t have it, you can build it from the source code included with basemap by following these steps:
I would look to see if the GEOS library is already installed. If it is, you don't need to to the export step.
 
I also tried it without the brackets and it said that the 'export' syntax is undefined.

How do I know if it is installed?
 
This is a command to export an environment variable under Linux. Windows doesn't know this command. I'm not familiar with this modules, but it seems that you need a compiler for it.

With Windows it's often better to use this Scientific Python Distributions with their own package manager like Anaconda: https://anaconda.org/anaconda/basemap
 
Thank you!
 

Similar threads

  • · Replies 15 ·
Replies
15
Views
8K
Replies
3
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 25 ·
Replies
25
Views
4K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 17 ·
Replies
17
Views
3K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
Replies
7
Views
3K
  • · Replies 9 ·
Replies
9
Views
5K