I wanted to create some map visualizations using python, and found Basemap is a library that many people recommend. However, I got into some troubles installing Basemap on mac. My favourite “pip install” strategy just didn’t work for this Basemap library.
The official home of the Python Programming Language. Downloads Mac OS X; Python Releases for Mac OS X. Latest Python 3 Release - Python 3.8.6; Latest Python 2 Release - Python 2.7.18; Stable Releases. Python 3.8.6 - Sept. Download macOS 64-bit installer.
The installation of Basemap requires some pre-requisites, while these pre-requisites require some other pre-requisites. And for some unknown reasons, the instruction I found on-line doesn’t work on my mac. So here is my step-by-step instructions to install Basemap library on mac. Hope it could help people having the some problem as I did.
To install Basemap, you need to have geos and proj.4 library installed on your system. https://cleverbanana577.weebly.com/blog/download-gta-4-torrent-for-mac. And the easiest way I found to install these two library is to use MacPorts. To have MacPorts ready on your mac, you need to first install Xcode and command line tools for Xcode.
Then you can download MacPorts and install it on your computer. Download fl studio 11 demo mac.
With MacPort installed, you can then install geos and proj.4 libraries by using the following codes:
sudo port install geos sudo port install proj
Next, you need to download basemap package, unzip the package, and navigate to the directory:
cd basemap-1.x.x then run the following code: sudo python setup.py install Free Basemaps Downloads
Now, you are all set. Try simpletest.py in the examples folder under your basemap folder, you should be able to see a colored map (it takes a minute or so though).
It doesn’t look complicated at all at this point, but it was really a pain when you follow official or someone else’s instructions but always get errors. https://cleverbanana577.weebly.com/blog/download-mac-os-10104. I didn’t figure out why I got errors when following instructions (they must work for others), but I am glad that I eventually find a detour to walk around.
Python Basemap Example![]() Python Install Basemap
I guess that’s what happened in life. You don’t always find a way out following someone else’s steps, but it doesn’t mean you cannot find out your own way.
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2020
Categories |