-
Notifications
You must be signed in to change notification settings - Fork 396
Basemap installation failure in MacOS - Jupyter Notebook #583
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @mrjan1195! I find two issues to solve in your traceback:
|
Hi @molinav! Thank you for your reply. For 1, I used "python3 -m pip install cython --no-build-isolation", and I got: For 2, I have found it using "brew --prefix geos". Then I set it using " export GEOS_DIR="/Users/username/homebrew/opt/geos" ". I am still getting errors when running "pip3 install basemap" . × Building wheel for basemap (pyproject.toml) did not run successfully.
note: This error originates from a subprocess, and is likely not a problem with pip. |
Hi @mrjan1195! You still get the compiling issue because it installed Cython 3.0.0, which is our source of the problem. You need to specify the Cython version when installing it:
After that, you can install the current
Since you now have no warnings about |
Hi @molinav! Now, it is working. Thank you so much for your help. Cheers! |
Nice to hear! I am closing the issue then. If you have any other problems in the future, feel free to open an issue. |
Hi! I cannot install basemap in MacOS (M2 pro). I am getting the folllowing error with pip install basemap :
DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at Homebrew/homebrew-core#76621
Collecting basemap
Using cached basemap-1.3.7.zip (156 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting basemap-data<1.4,>=1.3.2 (from basemap)
Using cached basemap_data-1.3.2-py2.py3-none-any.whl (30.5 MB)
Collecting pyshp<2.4,>=1.2 (from basemap)
Using cached pyshp-2.3.1-py2.py3-none-any.whl (46 kB)
Collecting matplotlib<3.8,>=1.5 (from basemap)
Obtaining dependency information for matplotlib<3.8,>=1.5 from https://files.pythonhosted.org/packages/1d/57/888776de79e1c2e787368ecbe63e3e57dbec984a5c83220e44c15fefe226/matplotlib-3.7.2-cp39-cp39-macosx_10_12_x86_64.whl.metadata
Using cached matplotlib-3.7.2-cp39-cp39-macosx_10_12_x86_64.whl.metadata (5.6 kB)
Collecting pyproj<3.6.0,>=1.9.3 (from basemap)
Using cached pyproj-3.5.0-cp39-cp39-macosx_10_9_x86_64.whl (8.5 MB)
Collecting numpy<1.25,>=1.22 (from basemap)
Obtaining dependency information for numpy<1.25,>=1.22 from https://files.pythonhosted.org/packages/9a/cd/d5b0402b801c8a8b56b04c1e85c6165efab298d2f0ab741c2406516ede3a/numpy-1.24.4-cp39-cp39-macosx_10_9_x86_64.whl.metadata
Using cached numpy-1.24.4-cp39-cp39-macosx_10_9_x86_64.whl.metadata (5.6 kB)
Collecting contourpy>=1.0.1 (from matplotlib<3.8,>=1.5->basemap)
Obtaining dependency information for contourpy>=1.0.1 from https://files.pythonhosted.org/packages/44/b4/2bcb2f8afcb7a4652af0fbfa47d5f01ae599c4b35af6f89c1f33c9c56fa3/contourpy-1.1.0-cp39-cp39-macosx_10_9_x86_64.whl.metadata
Using cached contourpy-1.1.0-cp39-cp39-macosx_10_9_x86_64.whl.metadata (5.7 kB)
Collecting cycler>=0.10 (from matplotlib<3.8,>=1.5->basemap)
Using cached cycler-0.11.0-py3-none-any.whl (6.4 kB)
Collecting fonttools>=4.22.0 (from matplotlib<3.8,>=1.5->basemap)
Obtaining dependency information for fonttools>=4.22.0 from https://files.pythonhosted.org/packages/81/17/a18482c4fa12912913e9f19d9bb6fb1a62f92c377d7043d4bb7b98887da7/fonttools-4.41.1-cp39-cp39-macosx_10_9_x86_64.whl.metadata
Using cached fonttools-4.41.1-cp39-cp39-macosx_10_9_x86_64.whl.metadata (150 kB)
Collecting kiwisolver>=1.0.1 (from matplotlib<3.8,>=1.5->basemap)
Using cached kiwisolver-1.4.4-cp39-cp39-macosx_10_9_x86_64.whl (65 kB)
Requirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.9/site-packages (from matplotlib<3.8,>=1.5->basemap) (23.1)
Collecting pillow>=6.2.0 (from matplotlib<3.8,>=1.5->basemap)
Obtaining dependency information for pillow>=6.2.0 from https://files.pythonhosted.org/packages/ce/e1/861a5508b9fd82b39c05e4d49c0979a9c8ccab07dae39d0ce72bd5f2299d/Pillow-10.0.0-cp39-cp39-macosx_10_10_x86_64.whl.metadata
Using cached Pillow-10.0.0-cp39-cp39-macosx_10_10_x86_64.whl.metadata (9.5 kB)
Collecting pyparsing<3.1,>=2.3.1 (from matplotlib<3.8,>=1.5->basemap)
Using cached pyparsing-3.0.9-py3-none-any.whl (98 kB)
Requirement already satisfied: python-dateutil>=2.7 in /usr/local/lib/python3.9/site-packages (from matplotlib<3.8,>=1.5->basemap) (2.8.2)
Collecting importlib-resources>=3.2.0 (from matplotlib<3.8,>=1.5->basemap)
Obtaining dependency information for importlib-resources>=3.2.0 from https://files.pythonhosted.org/packages/29/d1/bed03eca30aa05aaf6e0873de091f9385c48705c4a607c2dfe3edbe543e8/importlib_resources-6.0.0-py3-none-any.whl.metadata
Using cached importlib_resources-6.0.0-py3-none-any.whl.metadata (4.2 kB)
Requirement already satisfied: certifi in /usr/local/lib/python3.9/site-packages (from pyproj<3.6.0,>=1.9.3->basemap) (2023.7.22)
Requirement already satisfied: zipp>=3.1.0 in /usr/local/lib/python3.9/site-packages (from importlib-resources>=3.2.0->matplotlib<3.8,>=1.5->basemap) (3.16.2)
Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.9/site-packages (from python-dateutil>=2.7->matplotlib<3.8,>=1.5->basemap) (1.16.0)
Using cached matplotlib-3.7.2-cp39-cp39-macosx_10_12_x86_64.whl (7.4 MB)
Using cached numpy-1.24.4-cp39-cp39-macosx_10_9_x86_64.whl (19.8 MB)
Using cached contourpy-1.1.0-cp39-cp39-macosx_10_9_x86_64.whl (243 kB)
Using cached fonttools-4.41.1-cp39-cp39-macosx_10_9_x86_64.whl (2.2 MB)
Using cached importlib_resources-6.0.0-py3-none-any.whl (31 kB)
Using cached Pillow-10.0.0-cp39-cp39-macosx_10_10_x86_64.whl (3.4 MB)
Building wheels for collected packages: basemap
Building wheel for basemap (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for basemap (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [116 lines of output]
:58: RuntimeWarning: Cannot find GEOS library and/or headers in standard locations ('/Users/joseangelohokson/local', '/Users/joseangelohokson', '/usr/local', '/usr', '/opt/local', '/opt', '/sw'). Please install the corresponding packages using your software management system or set the environment variable GEOS_DIR to point to the location where GEOS is installed (for example, if 'geos_c.h' is in '/usr/local/include' and 'libgeos_c' is in '/usr/local/lib', then you need to set GEOS_DIR to '/usr/local'
/private/var/folders/9q/gtxxxnqs13z7yjcptryz4zt40000gn/T/pip-build-env-n30y9c0j/overlay/lib/python3.9/site-packages/setuptools/dist.py:945: SetuptoolsDeprecationWarning: The namespace_packages parameter is deprecated.
!!
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for basemap
Failed to build basemap
ERROR: Could not build wheels for basemap, which is required to install pyproject.toml-based projects
Note: you may need to restart the kernel to use updated packages.
The text was updated successfully, but these errors were encountered: