2

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.

Georgy
  • 12,464
  • 7
  • 65
  • 73
Jianjian
  • 21
  • 2

4 Answers4

2

I saw this same error when trying to import geopandas. Simply restarting the python kernal worked for me, for now. I did not have to create a new conda environment. I am on BigSur 11.1 running Python 3.8 in VS Code 1.47.

Cross posting the open issue from Shapely that seems related: https://github.com/Toblerity/Shapely/issues/1038.

In my case, Shapely is a dependency of geopandas: https://geopandas.org/getting_started/install.html#dependencies.

bturse
  • 21
  • 3
0

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.

malvoisen
  • 158
  • 7
0

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

Georgy
  • 12,464
  • 7
  • 65
  • 73
Jianjian
  • 21
  • 2
0

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.

Dharman
  • 30,962
  • 25
  • 85
  • 135
stardustd
  • 59
  • 4