Terminal output that results in successful download of basemap matplotlib toolkit
Basemap is a useful toolkit that provides mapping capabilities through Matplotlib. I struggled a decent amount with installing this toolkit, as have many others it seems (based off of my online research while trying to figure out what was going wrong, as well as other students in my class at the time struggling to download it for an assignment). Initially, I attemtped to install Basemap through a typical conda install by conda install -c anaconda basemap. This was unsuccessful and resulted in an error when solving the environment. After trying different install methods through conda, updating all conda packages, updating python, etc., I was still unable to install Basemap. I should mention I'm running this code on a Mac, so I'm working in Unix. I considered installing Windows 10 through Boot camp on the Apple Store since many posts on Github and Stackexchange reported successful installs using Linux, but this seemed like a storage expensive option.
What finally resulted in my successful installation of Basecamp was creating a new virtual environment in Anaconda. After creating and activating the environment, I updated the version of Python, which was. 2.7 by default, to 3.8.5. After this, I was able to install Basemap by running git clone https://github.com/matplotlib/basemap.git in the director of the new environment. After Basemap installed, I changed directories into the basemap folder and then changed directories into geos-3.3.3, which is co-installed with this method inside of Basemap. Still in the geos-3.3.3 directory, I ran ./configure, make, make install. After this I downloaded proj4 in the basemap directory.
The Python script I'm running is for processing HDF files containing Lidar data. I installed the other packages necessary for running this, and then ran the file. It wasn't a successful run, but no errors related to the Basemap toolkit, so hopefully you'll have more success than me here. I'll keep working on this and post again once I have a successful script.
Below is the full terminal script that eventually resulted in my successful installation of Basemap (a Matplotlib toolkit). If you're feeling a bit masochistic, click "Read more" at the end of the post to see my full work and script output. If you don't feel like tormenting yourself, I've summarized what the key steps were to download and use Basemap in Python.
Last login: Thu Dec 3 13:42:20 on ttys000
(base) lauraglastra@Lauras-MacBook-Pro ~ % python --version
(base) lauraglastra@Lauras-MacBook-Pro ~ % pip --version
pip 20.3 from /Users/lauraglastra/opt/anaconda3/lib/python3.8/site-packages/pip (python 3.8)
(base) lauraglastra@Lauras-MacBook-Pro ~ % python -m pip install --upgrade pip setuptools wheel
Requirement already satisfied: pip in ./opt/anaconda3/lib/python3.8/site-packages (20.3)
Requirement already satisfied: setuptools in ./opt/anaconda3/lib/python3.8/site-packages (50.3.2.post20201201)
Requirement already satisfied: wheel in ./opt/anaconda3/lib/python3.8/site-packages (0.35.1)
Downloading pip-20.3.1-py2.py3-none-any.whl (1.5 MB)
|████████████████████████████████| 1.5 MB 1.4 MB/s
Write something about yourself. No need to be fancy, just an overview.