peterkuma / ccplot

Command-line application for visualizing data from CloudSat and CALIPSO satellites
http://ccplot.org
Other
35 stars 7 forks source link

ImportError: dlopen ... symbol not found in flat namespace '_GEOSArea' #10

Closed joaquinezcurra closed 2 years ago

joaquinezcurra commented 2 years ago

Hi Peter! I am having some trouble running ccplot on my new Mac. Followed these steps to install ccplot:

  1. Installed full Ananconda
  2. Installed Command line tools (necessary for MacPorts)
  3. Installed MacPorts
  4. Installed MacPorts packages
  5. Installed basemap (it's pulling v1.2.2)
  6. Built and installed ccplot

I get this error message:

(base) joaquinx@MacBook-Air-de-Joaquin ccplot-1.5.6 % ccplot -V
Traceback (most recent call last): File "/Users/joaquinx/opt/anaconda3/bin/ccplot", line 54, in from mpl_toolkits import basemap File "/Users/joaquinx/.local/lib/python3.8/site-packages/mpl_toolkits/basemap/init.py", line 53, in import _geoslib ImportError: dlopen(/Users/joaquinx/.local/lib/python3.8/site-packages/_geoslib.cpython-38-darwin.so, 0x0002): symbol not found in flat namespace '_GEOSArea'

In my research I found this link which could help, regrettably I wasn't able to fix it. https://github.com/Homebrew/homebrew-core/issues/5161

I unistalled everything twice and tried again, with no luck. Any idea of what can be happening? Many thanks!

peterkuma commented 2 years ago

Thank you for reporting the error. I have just tried installing ccplot on a recent version of macOS (Monterey), and I noticed that basemap no longer builds correctly. The installation script needed to be changed to "re-cythonize" a geos module. Basemap is no longer officially supported, and therefore I will need to update ccplot to use cartopy soon. In the meantime, I have made a fixed basemap repository available on GitHub. It can be installed with:

pip3 install git+https://github.com/peterkuma/basemap.git

This is a replacement for the equivalent command in the original ccplot installation instructions.

All that said, I assume your laptop is running on the new M1 CPU. I have only tested the installation on an x86 CPU. It is possible that the error you see is related to the different platform.

joaquinezcurra commented 2 years ago

Hey Peter! I deleted the previous basemap and then went on to install the "re-cythonized" version you provided, but still no luck, I get the same error message.

Traceback (most recent call last): File "/Users/joaquinx/opt/anaconda3/bin/ccplot", line 54, in <module> from mpl_toolkits import basemap File "/Users/joaquinx/opt/anaconda3/lib/python3.8/site-packages/mpl_toolkits/basemap/__init__.py", line 53, in <module> from mpl_toolkits.basemap import _geoslib ImportError: dlopen(/Users/joaquinx/opt/anaconda3/lib/python3.8/site-packages/mpl_toolkits/basemap/_geoslib.cpython-38-darwin.so, 0x0002): symbol not found in flat namespace '_GEOSArea'

I tried running one of basemap's samples on a Jupyter notebook and got the same error, so it seems it might still be related to basemap, or even to M1 like you said.

ImportError: dlopen(/Users/joaquinx/opt/anaconda3/lib/python3.8/site-packages/mpl_toolkits/basemap/_geoslib.cpython-38-darwin.so, 0x0002): symbol not found in flat namespace '_GEOSArea'

joaquinezcurra commented 2 years ago

The issue does not replicate on an Intel based Mac. So it seems definititely has to do with M1 processor architecture.

peterkuma commented 2 years ago

Thank you for trying this. I am currently migrating ccplot to the other map plotting library cartopy, which is available for ARM64 macOS.