AttributeError: 'LGEOS360' object has no attribute 'GEOSBufferWithParams'

Viewed 1915

I am using cartopy to draw maps and it worked well previously. But recently, when I use this package in JupyterLab, I got the following error:

'AttributeError: 'LGEOS360' object has no attribute 'GEOSBufferWithParams'.

I have updated my Mac OS system to Big Sur recently. I am not sure if this error is caused by upgrading. If so, what should I do?

I have tried to uninstall and install cartopy and Shapely. But neither worked.

4 Answers

I had the same issue after upgrading to Big Sur on an Intel Mac. Conda reported several inconsistencies that could not be resolved in 3 hours so I just killed the process. Then the following steps worked:

  1. Remove Anaconda - this guide is helpful.
  2. Install Anaconda 2020.11 - The release notes make no mention of Big Sur, but given 2020.11 was released after the new macOS, I took a leap of faith.
  3. Get serious with virtual environments and create one for your mapping project. I ended up going with Python 3.6 for the environment. Follow this guide to use the setup of the environment as your Jupyter Notebook kernel.
  4. Apparently there are some Mac-specific issues related to geoplotting packages. I followed the advice from here and installed geoplot, cartopy and shapely without binaries using pip install geoplot --no-binary geoplot (geoplot as an example).

I know that scrapping the Anaconda installation seems like a drastic move, but I could not find a workaround with the resources available online. Maybe waiting longer could have worked, but life is short to verify that.

I have solved this problem by creating a new environment in the current Anaconda.

I had similar error. As malvoisen suggested, I did this:

  1. Restart Anaconda
  2. Anaconda asks automatically if I want to update -> Updated Anaconda(now conda 4.9.2)

It is now working fine.

Related