Thanks Tobias. This, however, generated a new error (see below). So I reinstalled anaconda + obspy from scratch and updated anaconda to
4.6.2-py37_0, which resolved the issue.
cat.plot();
FileNotFoundError Traceback (most recent call last)
<ipython-input-2-de7ef835d031> in <module>
----> 1 cat.plot();
~/anaconda3/envs/obspy/lib/python3.5/site-packages/obspy/core/event/catalog.py in plot(self, projection, resolution, continent_fill_color, water_fill_color, label, color, colormap, show, outfile, method, fig, title, **kwargs)
650 cat.plot(fig=fig)
651 """
--> 652 from obspy.imaging.maps import plot_map, _plot_basemap_into_axes
653 import matplotlib
654 import matplotlib.pyplot as plt
~/anaconda3/envs/obspy/lib/python3.5/site-packages/obspy/imaging/maps.py in <module>
33
34 if BASEMAP_VERSION:
---> 35 from mpl_toolkits.basemap import Basemap
36 HAS_BASEMAP = True
37 if BASEMAP_VERSION < [1, 0, 4]:
~/anaconda3/envs/obspy/lib/python3.5/site-packages/mpl_toolkits/basemap/__init__.py in <module>
154 # create dictionary that maps epsg codes to Basemap kwargs.
155 pyproj_datadir = os.environ['PROJ_LIB']
--> 156 epsgf = open(os.path.join(pyproj_datadir,'epsg'))
157 epsg_dict={}
158 for line in epsgf:
FileNotFoundError: [Errno 2] No such file or directory: '/Users/januka/anaconda3/envs/obspy/share/proj/epsg'
Januka Attanayake
Research Fellow | Earthquake Seismology
Homepage: https://sites.google.com/site/janukaattanayake
School of Earth Sciences | McCoy Bldg. 200
University of Melbourne | Parkville 3010 VIC
Australia
Hi Januka,
it seems you’re getting hit by this basemap/proj conda packaging issue:
https://github.com/conda-forge/basemap-feedstock/issues/30
You should be able to work around this by doing this:
export PROJ_LIB=$CONDA_PREFIX/share/proj
after activating your obspy env and before starting python/ipython.
best,
Tobias