Repository navigation
Basemap install failing issue in MacOS #547
Description
Hi, I tried to install Basemap via pip in Mac OS, but I have encountered an error.
I also tried with another version (1.3.0), but those resulted in another error related to GEOS (it is installed and the environment variable is set correctly though).
Really appreciate your effort on this outstanding tool and thank you in advance for your support.
following is the log for installation of v 1.3.3:
$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.3.zip (155 kB)
Installing build dependencies ... error
error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> [553 lines of output]
Ignoring numpy: markers 'python_version >= "3.10"' don't match your environment
Ignoring numpy: markers 'python_version == "2.6" or (python_version >= "3.2" and python_version <= "3.3")' don't match your environment
Ignoring cython: markers 'python_version == "3.2"' don't match your environment
Collecting setuptools
Downloading setuptools-63.4.1-py3-none-any.whl (1.2 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 7.2 MB/s eta 0:00:00
Collecting wheel
Using cached wheel-0.37.1-py2.py3-none-any.whl (35 kB)
Collecting numpy==1.16.6
Using cached numpy-1.16.6.zip (5.1 MB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Collecting cython<3.1,>=0.29
Using cached Cython-0.29.32-py2.py3-none-any.whl (986 kB)
Building wheels for collected packages: numpy
Building wheel for numpy (setup.py): started
Building wheel for numpy (setup.py): finished with status 'error'
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [239 lines of output]
Running from numpy source directory.
/private/var/folders/fc/29bg66sx4_x32gn5bfz_0fgh0000gn/T/pip-install-mnxg0uip/numpy_cdaa9579c1e345e6b85c29fc7af2b92d/numpy/distutils/misc_util.py:476: SyntaxWarning: "is" with a literal. Did you mean "=="?
return is_string(s) and ('*' in s or '?' is s)
blas_opt_info:
blas_mkl_info:
customize UnixCCompiler
libraries mkl_rt not found in ['/usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/lib', '/usr/local/lib', '/usr/lib']
NOT AVAILABLE
blis_info:
customize UnixCCompiler
libraries blis not found in ['/usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/lib', '/usr/local/lib', '/usr/lib']
NOT AVAILABLE
openblas_info:
customize UnixCCompiler
customize UnixCCompiler
libraries openblas not found in ['/usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/lib', '/usr/local/lib', '/usr/lib']
NOT AVAILABLE
atlas_3_10_blas_threads_info:
Setting PTATLAS=ATLAS
customize UnixCCompiler
libraries tatlas not found in ['/usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/lib', '/usr/local/lib', '/usr/lib']
NOT AVAILABLE
atlas_3_10_blas_info:
customize UnixCCompiler
libraries satlas not found in ['/usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/lib', '/usr/local/lib', '/usr/lib']
NOT AVAILABLE
atlas_blas_threads_info:
Setting PTATLAS=ATLAS
customize UnixCCompiler
libraries ptf77blas,ptcblas,atlas not found in ['/usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/lib', '/usr/local/lib', '/usr/lib']
NOT AVAILABLE
atlas_blas_info:
customize UnixCCompiler
libraries f77blas,cblas,atlas not found in ['/usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/lib', '/usr/local/lib', '/usr/lib']
NOT AVAILABLE
accelerate_info:
FOUND:
extra_compile_args = ['-msse3', '-I/System/Library/Frameworks/vecLib.framework/Headers']
extra_link_args = ['-Wl,-framework', '-Wl,Accelerate']
define_macros = [('NO_ATLAS_INFO', 3), ('HAVE_CBLAS', None)]
FOUND:
extra_compile_args = ['-msse3', '-I/System/Library/Frameworks/vecLib.framework/Headers']
extra_link_args = ['-Wl,-framework', '-Wl,Accelerate']
define_macros = [('NO_ATLAS_INFO', 3), ('HAVE_CBLAS', None)]
/bin/sh: svnversion: command not found
non-existing path in 'numpy/distutils': 'site.cfg'
lapack_opt_info:
lapack_mkl_info:
customize UnixCCompiler
libraries mkl_rt not found in ['/usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/lib', '/usr/local/lib', '/usr/lib']
NOT AVAILABLE
openblas_lapack_info:
customize UnixCCompiler
customize UnixCCompiler
libraries openblas not found in ['/usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/lib', '/usr/local/lib', '/usr/lib']
NOT AVAILABLE
openblas_clapack_info:
customize UnixCCompiler
customize UnixCCompiler
libraries openblas,lapack not found in ['/usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/lib', '/usr/local/lib', '/usr/lib']
NOT AVAILABLE
atlas_3_10_threads_info:
Setting PTATLAS=ATLAS
customize UnixCCompiler
libraries lapack_atlas not found in /usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/lib
customize UnixCCompiler
libraries tatlas,tatlas not found in /usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/lib
customize UnixCCompiler
libraries lapack_atlas not found in /usr/local/lib
customize UnixCCompiler
libraries tatlas,tatlas not found in /usr/local/lib
customize UnixCCompiler
libraries lapack_atlas not found in /usr/lib
customize UnixCCompiler
libraries tatlas,tatlas not found in /usr/lib
<class 'numpy.distutils.system_info.atlas_3_10_threads_info'>
NOT AVAILABLE
atlas_3_10_info:
customize UnixCCompiler
libraries lapack_atlas not found in /usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/lib
customize UnixCCompiler
libraries satlas,satlas not found in /usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/lib
customize UnixCCompiler
libraries lapack_atlas not found in /usr/local/lib
customize UnixCCompiler
libraries satlas,satlas not found in /usr/local/lib
customize UnixCCompiler
libraries lapack_atlas not found in /usr/lib
customize UnixCCompiler
libraries satlas,satlas not found in /usr/lib
<class 'numpy.distutils.system_info.atlas_3_10_info'>
NOT AVAILABLE
atlas_threads_info:
Setting PTATLAS=ATLAS
customize UnixCCompiler
libraries lapack_atlas not found in /usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/lib
customize UnixCCompiler
libraries ptf77blas,ptcblas,atlas not found in /usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/lib
customize UnixCCompiler
libraries lapack_atlas not found in /usr/local/lib
customize UnixCCompiler
libraries ptf77blas,ptcblas,atlas not found in /usr/local/lib
customize UnixCCompiler
libraries lapack_atlas not found in /usr/lib
customize UnixCCompiler
libraries ptf77blas,ptcblas,atlas not found in /usr/lib
<class 'numpy.distutils.system_info.atlas_threads_info'>
NOT AVAILABLE
atlas_info:
customize UnixCCompiler
libraries lapack_atlas not found in /usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/lib
customize UnixCCompiler
libraries f77blas,cblas,atlas not found in /usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/lib
customize UnixCCompiler
libraries lapack_atlas not found in /usr/local/lib
customize UnixCCompiler
libraries f77blas,cblas,atlas not found in /usr/local/lib
customize UnixCCompiler
libraries lapack_atlas not found in /usr/lib
customize UnixCCompiler
libraries f77blas,cblas,atlas not found in /usr/lib
<class 'numpy.distutils.system_info.atlas_info'>
NOT AVAILABLE
FOUND:
extra_compile_args = ['-msse3', '-I/System/Library/Frameworks/vecLib.framework/Headers']
extra_link_args = ['-Wl,-framework', '-Wl,Accelerate']
define_macros = [('NO_ATLAS_INFO', 3), ('HAVE_CBLAS', None)]
/usr/local/lib/python3.9/site-packages/setuptools/_distutils/dist.py:275: UserWarning: Unknown distribution option: 'define_macros'
warnings.warn(msg)
running bdist_wheel
running build
running config_cc
unifing config_cc, config, build_clib, build_ext, build commands --compiler options
running config_fc
unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
running build_src
build_src
building py_modules sources
creating build
creating build/src.macosx-12-x86_64-3.9
creating build/src.macosx-12-x86_64-3.9/numpy
creating build/src.macosx-12-x86_64-3.9/numpy/distutils
building library "npymath" sources
get_default_fcompiler: matching types: '['gnu95', 'nag', 'absoft', 'ibm', 'intel', 'gnu', 'g95', 'pg']'
customize Gnu95FCompiler
Found executable /usr/local/bin/gfortran
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/private/var/folders/fc/29bg66sx4_x32gn5bfz_0fgh0000gn/T/pip-install-mnxg0uip/numpy_cdaa9579c1e345e6b85c29fc7af2b92d/setup.py", line 419, in <module>
setup_package()
File "/private/var/folders/fc/29bg66sx4_x32gn5bfz_0fgh0000gn/T/pip-install-mnxg0uip/numpy_cdaa9579c1e345e6b85c29fc7af2b92d/setup.py", line 411, in setup_package
setup(**metadata)
File "/private/var/folders/fc/29bg66sx4_x32gn5bfz_0fgh0000gn/T/pip-install-mnxg0uip/numpy_cdaa9579c1e345e6b85c29fc7af2b92d/numpy/distutils/core.py", line 171, in setup
return old_setup(**new_attr)
File "/usr/local/lib/python3.9/site-packages/setuptools/__init__.py", line 87, in setup
return distutils.core.setup(**attrs)
File "/usr/local/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 148, in setup
return run_commands(dist)
File "/usr/local/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 163, in run_commands
dist.run_commands()
File "/usr/local/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 967, in run_commands
self.run_command(cmd)
File "/usr/local/lib/python3.9/site-packages/setuptools/dist.py", line 1229, in run_command
super().run_command(command)
File "/usr/local/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.9/site-packages/wheel/bdist_wheel.py", line 299, in run
self.run_command('build')
File "/usr/local/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/local/lib/python3.9/site-packages/setuptools/dist.py", line 1229, in run_command
super().run_command(command)
File "/usr/local/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
cmd_obj.run()
File "/private/var/folders/fc/29bg66sx4_x32gn5bfz_0fgh0000gn/T/pip-install-mnxg0uip/numpy_cdaa9579c1e345e6b85c29fc7af2b92d/numpy/distutils/command/build.py", line 47, in run
old_build.run(self)
File "/usr/local/lib/python3.9/site-packages/setuptools/_distutils/command/build.py", line 136, in run
self.run_command(cmd_name)
File "/usr/local/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/local/lib/python3.9/site-packages/setuptools/dist.py", line 1229, in run_command
super().run_command(command)
File "/usr/local/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
cmd_obj.run()
File "/private/var/folders/fc/29bg66sx4_x32gn5bfz_0fgh0000gn/T/pip-install-mnxg0uip/numpy_cdaa9579c1e345e6b85c29fc7af2b92d/numpy/distutils/command/build_src.py", line 148, in run
self.build_sources()
File "/private/var/folders/fc/29bg66sx4_x32gn5bfz_0fgh0000gn/T/pip-install-mnxg0uip/numpy_cdaa9579c1e345e6b85c29fc7af2b92d/numpy/distutils/command/build_src.py", line 159, in build_sources
self.build_library_sources(*libname_info)
File "/private/var/folders/fc/29bg66sx4_x32gn5bfz_0fgh0000gn/T/pip-install-mnxg0uip/numpy_cdaa9579c1e345e6b85c29fc7af2b92d/numpy/distutils/command/build_src.py", line 292, in build_library_sources
sources = self.generate_sources(sources, (lib_name, build_info))
File "/private/var/folders/fc/29bg66sx4_x32gn5bfz_0fgh0000gn/T/pip-install-mnxg0uip/numpy_cdaa9579c1e345e6b85c29fc7af2b92d/numpy/distutils/command/build_src.py", line 375, in generate_sources
source = func(extension, build_dir)
File "numpy/core/setup.py", line 665, in get_mathlib_info
st = config_cmd.try_link('int main(void) { return 0;}')
File "/usr/local/lib/python3.9/site-packages/setuptools/_distutils/command/config.py", line 241, in try_link
self._check_compiler()
File "/private/var/folders/fc/29bg66sx4_x32gn5bfz_0fgh0000gn/T/pip-install-mnxg0uip/numpy_cdaa9579c1e345e6b85c29fc7af2b92d/numpy/distutils/command/config.py", line 80, in _check_compiler
self.fcompiler = new_fcompiler(compiler=self.fcompiler,
File "/private/var/folders/fc/29bg66sx4_x32gn5bfz_0fgh0000gn/T/pip-install-mnxg0uip/numpy_cdaa9579c1e345e6b85c29fc7af2b92d/numpy/distutils/fcompiler/__init__.py", line 884, in new_fcompiler
compiler = get_default_fcompiler(plat, requiref90=requiref90,
File "/private/var/folders/fc/29bg66sx4_x32gn5bfz_0fgh0000gn/T/pip-install-mnxg0uip/numpy_cdaa9579c1e345e6b85c29fc7af2b92d/numpy/distutils/fcompiler/__init__.py", line 855, in get_default_fcompiler
compiler_type = _find_existing_fcompiler(matching_compiler_types,
File "/private/var/folders/fc/29bg66sx4_x32gn5bfz_0fgh0000gn/T/pip-install-mnxg0uip/numpy_cdaa9579c1e345e6b85c29fc7af2b92d/numpy/distutils/fcompiler/__init__.py", line 806, in _find_existing_fcompiler
c.customize(dist)
File "/private/var/folders/fc/29bg66sx4_x32gn5bfz_0fgh0000gn/T/pip-install-mnxg0uip/numpy_cdaa9579c1e345e6b85c29fc7af2b92d/numpy/distutils/fcompiler/__init__.py", line 530, in customize
linker_so_flags = self.flag_vars.linker_so
File "/private/var/folders/fc/29bg66sx4_x32gn5bfz_0fgh0000gn/T/pip-install-mnxg0uip/numpy_cdaa9579c1e345e6b85c29fc7af2b92d/numpy/distutils/fcompiler/environment.py", line 40, in __getattr__
return self._get_var(name, conf_desc)
File "/private/var/folders/fc/29bg66sx4_x32gn5bfz_0fgh0000gn/T/pip-install-mnxg0uip/numpy_cdaa9579c1e345e6b85c29fc7af2b92d/numpy/distutils/fcompiler/environment.py", line 56, in _get_var
var = self._hook_handler(name, hook)
File "/private/var/folders/fc/29bg66sx4_x32gn5bfz_0fgh0000gn/T/pip-install-mnxg0uip/numpy_cdaa9579c1e345e6b85c29fc7af2b92d/numpy/distutils/fcompiler/__init__.py", line 709, in _environment_hook
return hook()
File "/private/var/folders/fc/29bg66sx4_x32gn5bfz_0fgh0000gn/T/pip-install-mnxg0uip/numpy_cdaa9579c1e345e6b85c29fc7af2b92d/numpy/distutils/fcompiler/gnu.py", line 353, in get_flags_linker_so
flags = GnuFCompiler.get_flags_linker_so(self)
File "/private/var/folders/fc/29bg66sx4_x32gn5bfz_0fgh0000gn/T/pip-install-mnxg0uip/numpy_cdaa9579c1e345e6b85c29fc7af2b92d/numpy/distutils/fcompiler/gnu.py", line 144, in get_flags_linker_so
os.environ['MACOSX_DEPLOYMENT_TARGET'] = target
File "/usr/local/Cellar/python@3.9/3.9.13_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/os.py", line 684, in __setitem__
value = self.encodevalue(value)
File "/usr/local/Cellar/python@3.9/3.9.13_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/os.py", line 756, in encode
raise TypeError("str expected, not %s" % type(value).__name__)
TypeError: str expected, not int
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for numpy
Running setup.py clean for numpy
error: subprocess-exited-with-error
× python setup.py clean did not run successfully.
│ exit code: 1
╰─> [10 lines of output]
Running from numpy source directory.
`setup.py clean` is not supported, use one of the following instead:
- `git clean -xdf` (cleans all files)
- `git clean -Xdf` (cleans all versioned files, doesn't touch
files that aren't checked into the git repo)
Add `--force` to your command to use it anyway if you must (unsupported).
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed cleaning build dir for numpy
Failed to build numpy
Installing collected packages: wheel, setuptools, numpy, cython
Running setup.py install for numpy: started
Running setup.py install for numpy: finished with status 'error'
error: subprocess-exited-with-error
× Running setup.py install for numpy did not run successfully.
│ exit code: 1
╰─> [248 lines of output]
Running from numpy source directory.
Note: if you need reliable uninstall behavior, then install
with pip instead of using `setup.py install`:
- `pip install .` (from a git repo or downloaded source
release)
- `pip install numpy` (last NumPy release on PyPi)
blas_opt_info:
blas_mkl_info:
customize UnixCCompiler
libraries mkl_rt not found in ['/usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/lib', '/usr/local/lib', '/usr/lib']
NOT AVAILABLE
blis_info:
customize UnixCCompiler
libraries blis not found in ['/usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/lib', '/usr/local/lib', '/usr/lib']
NOT AVAILABLE
openblas_info:
customize UnixCCompiler
customize UnixCCompiler
libraries openblas not found in ['/usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/lib', '/usr/local/lib', '/usr/lib']
NOT AVAILABLE
atlas_3_10_blas_threads_info:
Setting PTATLAS=ATLAS
customize UnixCCompiler
libraries tatlas not found in ['/usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/lib', '/usr/local/lib', '/usr/lib']
NOT AVAILABLE
atlas_3_10_blas_info:
customize UnixCCompiler
libraries satlas not found in ['/usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/lib', '/usr/local/lib', '/usr/lib']
NOT AVAILABLE
atlas_blas_threads_info:
Setting PTATLAS=ATLAS
customize UnixCCompiler
libraries ptf77blas,ptcblas,atlas not found in ['/usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/lib', '/usr/local/lib', '/usr/lib']
NOT AVAILABLE
atlas_blas_info:
customize UnixCCompiler
libraries f77blas,cblas,atlas not found in ['/usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/lib', '/usr/local/lib', '/usr/lib']
NOT AVAILABLE
accelerate_info:
FOUND:
extra_compile_args = ['-msse3', '-I/System/Library/Frameworks/vecLib.framework/Headers']
extra_link_args = ['-Wl,-framework', '-Wl,Accelerate']
define_macros = [('NO_ATLAS_INFO', 3), ('HAVE_CBLAS', None)]
FOUND:
extra_compile_args = ['-msse3', '-I/System/Library/Frameworks/vecLib.framework/Headers']
extra_link_args = ['-Wl,-framework', '-Wl,Accelerate']
define_macros = [('NO_ATLAS_INFO', 3), ('HAVE_CBLAS', None)]
/bin/sh: svnversion: command not found
non-existing path in 'numpy/distutils': 'site.cfg'
lapack_opt_info:
lapack_mkl_info:
customize UnixCCompiler
libraries mkl_rt not found in ['/usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/lib', '/usr/local/lib', '/usr/lib']
NOT AVAILABLE
openblas_lapack_info:
customize UnixCCompiler
customize UnixCCompiler
libraries openblas not found in ['/usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/lib', '/usr/local/lib', '/usr/lib']
NOT AVAILABLE
openblas_clapack_info:
customize UnixCCompiler
customize UnixCCompiler
libraries openblas,lapack not found in ['/usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/lib', '/usr/local/lib', '/usr/lib']
NOT AVAILABLE
atlas_3_10_threads_info:
Setting PTATLAS=ATLAS
customize UnixCCompiler
libraries lapack_atlas not found in /usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/lib
customize UnixCCompiler
libraries tatlas,tatlas not found in /usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/lib
customize UnixCCompiler
libraries lapack_atlas not found in /usr/local/lib
customize UnixCCompiler
libraries tatlas,tatlas not found in /usr/local/lib
customize UnixCCompiler
libraries lapack_atlas not found in /usr/lib
customize UnixCCompiler
libraries tatlas,tatlas not found in /usr/lib
<class 'numpy.distutils.system_info.atlas_3_10_threads_info'>
NOT AVAILABLE
atlas_3_10_info:
customize UnixCCompiler
libraries lapack_atlas not found in /usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/lib
customize UnixCCompiler
libraries satlas,satlas not found in /usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/lib
customize UnixCCompiler
libraries lapack_atlas not found in /usr/local/lib
customize UnixCCompiler
libraries satlas,satlas not found in /usr/local/lib
customize UnixCCompiler
libraries lapack_atlas not found in /usr/lib
customize UnixCCompiler
libraries satlas,satlas not found in /usr/lib
<class 'numpy.distutils.system_info.atlas_3_10_info'>
NOT AVAILABLE
atlas_threads_info:
Setting PTATLAS=ATLAS
customize UnixCCompiler
libraries lapack_atlas not found in /usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/lib
customize UnixCCompiler
libraries ptf77blas,ptcblas,atlas not found in /usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/lib
customize UnixCCompiler
libraries lapack_atlas not found in /usr/local/lib
customize UnixCCompiler
libraries ptf77blas,ptcblas,atlas not found in /usr/local/lib
customize UnixCCompiler
libraries lapack_atlas not found in /usr/lib
customize UnixCCompiler
libraries ptf77blas,ptcblas,atlas not found in /usr/lib
<class 'numpy.distutils.system_info.atlas_threads_info'>
NOT AVAILABLE
atlas_info:
customize UnixCCompiler
libraries lapack_atlas not found in /usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/lib
customize UnixCCompiler
libraries f77blas,cblas,atlas not found in /usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/lib
customize UnixCCompiler
libraries lapack_atlas not found in /usr/local/lib
customize UnixCCompiler
libraries f77blas,cblas,atlas not found in /usr/local/lib
customize UnixCCompiler
libraries lapack_atlas not found in /usr/lib
customize UnixCCompiler
libraries f77blas,cblas,atlas not found in /usr/lib
<class 'numpy.distutils.system_info.atlas_info'>
NOT AVAILABLE
FOUND:
extra_compile_args = ['-msse3', '-I/System/Library/Frameworks/vecLib.framework/Headers']
extra_link_args = ['-Wl,-framework', '-Wl,Accelerate']
define_macros = [('NO_ATLAS_INFO', 3), ('HAVE_CBLAS', None)]
/usr/local/lib/python3.9/site-packages/setuptools/_distutils/dist.py:275: UserWarning: Unknown distribution option: 'define_macros'
warnings.warn(msg)
running install
/usr/local/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running config_cc
unifing config_cc, config, build_clib, build_ext, build commands --compiler options
running config_fc
unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
running build_src
build_src
building py_modules sources
building library "npymath" sources
get_default_fcompiler: matching types: '['gnu95', 'nag', 'absoft', 'ibm', 'intel', 'gnu', 'g95', 'pg']'
customize Gnu95FCompiler
Found executable /usr/local/bin/gfortran
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/private/var/folders/fc/29bg66sx4_x32gn5bfz_0fgh0000gn/T/pip-install-mnxg0uip/numpy_cdaa9579c1e345e6b85c29fc7af2b92d/setup.py", line 419, in <module>
setup_package()
File "/private/var/folders/fc/29bg66sx4_x32gn5bfz_0fgh0000gn/T/pip-install-mnxg0uip/numpy_cdaa9579c1e345e6b85c29fc7af2b92d/setup.py", line 411, in setup_package
setup(**metadata)
File "/private/var/folders/fc/29bg66sx4_x32gn5bfz_0fgh0000gn/T/pip-install-mnxg0uip/numpy_cdaa9579c1e345e6b85c29fc7af2b92d/numpy/distutils/core.py", line 171, in setup
return old_setup(**new_attr)
File "/usr/local/lib/python3.9/site-packages/setuptools/__init__.py", line 87, in setup
return distutils.core.setup(**attrs)
File "/usr/local/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 148, in setup
return run_commands(dist)
File "/usr/local/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 163, in run_commands
dist.run_commands()
File "/usr/local/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 967, in run_commands
self.run_command(cmd)
File "/usr/local/lib/python3.9/site-packages/setuptools/dist.py", line 1229, in run_command
super().run_command(command)
File "/usr/local/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
cmd_obj.run()
File "/private/var/folders/fc/29bg66sx4_x32gn5bfz_0fgh0000gn/T/pip-install-mnxg0uip/numpy_cdaa9579c1e345e6b85c29fc7af2b92d/numpy/distutils/command/install.py", line 62, in run
r = self.setuptools_run()
File "/private/var/folders/fc/29bg66sx4_x32gn5bfz_0fgh0000gn/T/pip-install-mnxg0uip/numpy_cdaa9579c1e345e6b85c29fc7af2b92d/numpy/distutils/command/install.py", line 36, in setuptools_run
return distutils_install.run(self)
File "/usr/local/lib/python3.9/site-packages/setuptools/_distutils/command/install.py", line 670, in run
self.run_command('build')
File "/usr/local/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/local/lib/python3.9/site-packages/setuptools/dist.py", line 1229, in run_command
super().run_command(command)
File "/usr/local/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
cmd_obj.run()
File "/private/var/folders/fc/29bg66sx4_x32gn5bfz_0fgh0000gn/T/pip-install-mnxg0uip/numpy_cdaa9579c1e345e6b85c29fc7af2b92d/numpy/distutils/command/build.py", line 47, in run
old_build.run(self)
File "/usr/local/lib/python3.9/site-packages/setuptools/_distutils/command/build.py", line 136, in run
self.run_command(cmd_name)
File "/usr/local/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/local/lib/python3.9/site-packages/setuptools/dist.py", line 1229, in run_command
super().run_command(command)
File "/usr/local/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
cmd_obj.run()
File "/private/var/folders/fc/29bg66sx4_x32gn5bfz_0fgh0000gn/T/pip-install-mnxg0uip/numpy_cdaa9579c1e345e6b85c29fc7af2b92d/numpy/distutils/command/build_src.py", line 148, in run
self.build_sources()
File "/private/var/folders/fc/29bg66sx4_x32gn5bfz_0fgh0000gn/T/pip-install-mnxg0uip/numpy_cdaa9579c1e345e6b85c29fc7af2b92d/numpy/distutils/command/build_src.py", line 159, in build_sources
self.build_library_sources(*libname_info)
File "/private/var/folders/fc/29bg66sx4_x32gn5bfz_0fgh0000gn/T/pip-install-mnxg0uip/numpy_cdaa9579c1e345e6b85c29fc7af2b92d/numpy/distutils/command/build_src.py", line 292, in build_library_sources
sources = self.generate_sources(sources, (lib_name, build_info))
File "/private/var/folders/fc/29bg66sx4_x32gn5bfz_0fgh0000gn/T/pip-install-mnxg0uip/numpy_cdaa9579c1e345e6b85c29fc7af2b92d/numpy/distutils/command/build_src.py", line 375, in generate_sources
source = func(extension, build_dir)
File "numpy/core/setup.py", line 665, in get_mathlib_info
st = config_cmd.try_link('int main(void) { return 0;}')
File "/usr/local/lib/python3.9/site-packages/setuptools/_distutils/command/config.py", line 241, in try_link
self._check_compiler()
File "/private/var/folders/fc/29bg66sx4_x32gn5bfz_0fgh0000gn/T/pip-install-mnxg0uip/numpy_cdaa9579c1e345e6b85c29fc7af2b92d/numpy/distutils/command/config.py", line 80, in _check_compiler
self.fcompiler = new_fcompiler(compiler=self.fcompiler,
File "/private/var/folders/fc/29bg66sx4_x32gn5bfz_0fgh0000gn/T/pip-install-mnxg0uip/numpy_cdaa9579c1e345e6b85c29fc7af2b92d/numpy/distutils/fcompiler/__init__.py", line 884, in new_fcompiler
compiler = get_default_fcompiler(plat, requiref90=requiref90,
File "/private/var/folders/fc/29bg66sx4_x32gn5bfz_0fgh0000gn/T/pip-install-mnxg0uip/numpy_cdaa9579c1e345e6b85c29fc7af2b92d/numpy/distutils/fcompiler/__init__.py", line 855, in get_default_fcompiler
compiler_type = _find_existing_fcompiler(matching_compiler_types,
File "/private/var/folders/fc/29bg66sx4_x32gn5bfz_0fgh0000gn/T/pip-install-mnxg0uip/numpy_cdaa9579c1e345e6b85c29fc7af2b92d/numpy/distutils/fcompiler/__init__.py", line 806, in _find_existing_fcompiler
c.customize(dist)
File "/private/var/folders/fc/29bg66sx4_x32gn5bfz_0fgh0000gn/T/pip-install-mnxg0uip/numpy_cdaa9579c1e345e6b85c29fc7af2b92d/numpy/distutils/fcompiler/__init__.py", line 530, in customize
linker_so_flags = self.flag_vars.linker_so
File "/private/var/folders/fc/29bg66sx4_x32gn5bfz_0fgh0000gn/T/pip-install-mnxg0uip/numpy_cdaa9579c1e345e6b85c29fc7af2b92d/numpy/distutils/fcompiler/environment.py", line 40, in __getattr__
return self._get_var(name, conf_desc)
File "/private/var/folders/fc/29bg66sx4_x32gn5bfz_0fgh0000gn/T/pip-install-mnxg0uip/numpy_cdaa9579c1e345e6b85c29fc7af2b92d/numpy/distutils/fcompiler/environment.py", line 56, in _get_var
var = self._hook_handler(name, hook)
File "/private/var/folders/fc/29bg66sx4_x32gn5bfz_0fgh0000gn/T/pip-install-mnxg0uip/numpy_cdaa9579c1e345e6b85c29fc7af2b92d/numpy/distutils/fcompiler/__init__.py", line 709, in _environment_hook
return hook()
File "/private/var/folders/fc/29bg66sx4_x32gn5bfz_0fgh0000gn/T/pip-install-mnxg0uip/numpy_cdaa9579c1e345e6b85c29fc7af2b92d/numpy/distutils/fcompiler/gnu.py", line 353, in get_flags_linker_so
flags = GnuFCompiler.get_flags_linker_so(self)
File "/private/var/folders/fc/29bg66sx4_x32gn5bfz_0fgh0000gn/T/pip-install-mnxg0uip/numpy_cdaa9579c1e345e6b85c29fc7af2b92d/numpy/distutils/fcompiler/gnu.py", line 144, in get_flags_linker_so
os.environ['MACOSX_DEPLOYMENT_TARGET'] = target
File "/usr/local/Cellar/python@3.9/3.9.13_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/os.py", line 684, in __setitem__
value = self.encodevalue(value)
File "/usr/local/Cellar/python@3.9/3.9.13_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/os.py", line 756, in encode
raise TypeError("str expected, not %s" % type(value).__name__)
TypeError: str expected, not int
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> numpy
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
WARNING: There was an error checking the latest version of pip.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
WARNING: There was an error checking the latest version of pip.
And, following is NumPy info:
$pip show numpy
Name: numpy
Version: 1.23.1
Summary: NumPy is the fundamental package for array computing with Python.
Home-page: https://www.numpy.org
Author: Travis E. Oliphant et al.
Author-email:
License: BSD
Location: /usr/local/lib/python3.9/site-packages
Requires:
Required-by: cftime, h5py, matplotlib, netCDF4, pandas, ray, scipy, wradlib, xarray
Next is pip, and python versions:
$pip -V
pip 22.1.1 from /usr/local/lib/python3.9/site-packages/pip (python 3.9)
Activity
molinav commentedon Aug 6, 2022
Hi @SongJaeIn! It looks like the problem is coming from the current build dependency definition in the
pyproject.toml, because it is pinning to a very specificnumpyversion (v1.16.6 for Python 3.9), and your computer fails to build thisnumpyversion from source. I think numpy/numpy#17987 is the issue that you are seeing on MacOS, which was not solved untilnumpyv1.21.0.Your installed
numpylibrary is newer (v1.23.1), which is perfectly normal. The original reason for being so specific with thenumpyversion for building is that we need to compile the distributed precompiled binary wheels with a very oldnumpyversion to ensure that they work in as many computers as possible. For example, if the distributed wheels were compiled withnumpyv1.23.1, later a user withnumpyv1.19.5 would not be able to use them, but buildingbasemapwith an oldnumpyand later usingbasemapwith a newernumpydoes work. However, the combination of the formernumpybug on MacOS and thenumpypinning in thepyproject.tomlis making you impossible to installbasemap.Probably the implementation in
pyproject.tomlis at the moment too overkilling, and it could be enough to replace thenumpyrequirements so that they use>=instead of==. Anyhow in the GitHub workflows I install oldnumpylibraries on purpose before buildingbasemap, so the workflows would not suffer with the change from==to>=.molinav commentedon Aug 6, 2022
@SongJaeIn Can you try installing from the latest commit in the repository? You can do:
After installing, I also recommend you do the simple test:
to ensure that the
_geoslibextension was built properly and that you can import it.molinav commentedon Aug 6, 2022
Ok so my changes seem to break the current GitHub workflows... I will need to edit the
pyproject.tomlfile with specific build dependencies for MacOS.molinav commentedon Aug 6, 2022
@SongJaeIn Can you try once again with the same command? I have just updated the
pyproject.tomlfile because my first attempt was not successful and it also broke the builds for Windows and GNU/Linux. Now thepyproject.tomlfile looks like this:basemap/packages/basemap/pyproject.toml
Line 6 in bd8b7be
so now your computer should try to build
basemapusingnumpyv1.21.4, which should be compilable on MacOS. And once built, you should be able to usebasemapwith any newernumpy. First ensure to uninstall the brokenbasemap:molinav commentedon Aug 6, 2022
@SongJaeIn By the way, this
RuntimeErroris the reason why in the beginning we pin to very oldnumpyversions when building. It also gave me a bit of headaches in the past but was solved for Windows and GNU/Linux. Unfortunately I did not have a Mac around to also test the solution on Mac at that time, and you were unlucky that MacOS had this build problem withnumpyuntil v1.21.0.molinav commentedon Aug 6, 2022
Great to hear that, @SongJaeIn! When I get some more time, I will prepare a patch release v1.3.4 with this correction and then you will be able to install
basemapwithpipas you were trying to do in the beginning.ihaseeburrehman commentedon Dec 14, 2022
@molinav I have installed Basemap -1.3.6+dev
when I try python -c "from mpl_toolkits import basemap; print(basemap)"
it gave me this
<module 'mpl_toolkits.basemap' from '/opt/homebrew/Caskroom/miniconda/base/envs/matplot/lib/python3.10/site-packages/mpl_toolkits/basemap/init.py'>
but when I try to test Basemap in Anaconda it says 'module not found'
Furthermore , I tried pip install Basemap , it was unsuccessful (cc1: fatal error: src/_geoslib.c: No such file or directory)
I set environment
export GEOS_DIR=/opt/homebrew/Cellar/geos/3.11.1/
I have Mac with M1-max running Ventura 13.0.1
Appreciate if you can advise.
thanks
molinav commentedon Dec 15, 2022
Hi @ihaseeburrehman! I am not sure if I am understanding the issue. Do you have separate installations of Python, a normal one (e.g. from Homebrew, I assume Miniconda based on the
basemapmodule path) and another one coming from Anaconda?The installation procedure for Miniconda and Anaconda should be the same in both cases on MacOS with M1. Since there are no precompiled wheels or conda packages for MacOS M1, you need to install
basemapfrom the source distribution in PyPI with:or it is even better if you install the dependencies manually with
conda installand later do:Since you were able to install
basemapfor Miniconda, you seem to also have a working C/C++ compiler available to build the_geoslibmodule, so this is also not an issue. If you provide more feedback I can try to help a bit more.ihaseeburrehman commentedon Dec 15, 2022
Hi Thanks for your response.

Let me try again to explain my issue
in Mac terminal I have successfully installed basemap and also passed the test by executing the following command
python -c "from mpl_toolkits import basemap; print(basemap)"
I have attached the terminal window screenshot.
But when I tried in Anaconda (Spyder)
from mpl_toolkits import basemap
it says
ImportError: cannot import name 'basemap' from 'mpl_toolkits' (unknown location)
I have attached the Spyder kernal screenshot.

I am wondering why anaconda (Spyder) is not importing basemap from mpl_toolkits.
molinav commentedon Dec 15, 2022
Thanks for the additional feedback, @ihaseeburrehman. The issue is that
basemapis installed only in one of your Python installations:basemapis installed for your Python from the/opt/homebrew/Caskroom/miniconda/baseinstallation (Miniconda)./opt/anaconda3installation (Anaconda3), for whichbasemapis not installed.The Python installations do not share packages, each has its own installation path. To have
basemapin Spyder3, you need to install it for the appropriate Python installation, i.e. you need to dopython -m pip install basemapafter being sure that "python" does point to the Anaconda3 Python, not to the Miniconda one.You can check where Python is pointing to with:
command -v pythonihaseeburrehman commentedon Dec 15, 2022
I struggling with installation of basemap in anaconda.
I tried
pip install basemap
it says "could not built wheels for basemap." it similar issue reported in #547

I also set the environment for geos
export GEOS_DIR=/opt/homebrew/Cellar/geos/3.11.1/
but not able to install, any suggestion ?
ihaseeburrehman commentedon Dec 19, 2022
Hi @molinav Thanks for your feedback .
I skip installation of basemap in Anaconda (Spyder). Because in the end I need to use basemap in python console of QGIS.
As I mentioned earlier basemap is installed in miniconda (from homebrew) successfully but when I tried to import it in QGIS python console it says "no module named _geoslib". Geoslib is also installed with version 3.11.1.
I tried the same procedure on Linux machine and it completed with no error.
But on Mac M1 it is giving me this error.
I am not sure, but I think I need to define the geoslib path in QGIS (I did this in QGIS env), but not getting results.
see the attached the picture.

wonder if you can suggest something.
thanks
drew-wks commentedon Aug 3, 2023
Hi @molinav,
I tried installing basemap using the commands given above:
pip install https://github.com/matplotlib/basemap/archive/refs/heads/develop.zip#subdirectory=packages/basemapbut receive the same error:
Collecting basemap-data<1.4,>=1.3.2 (from basemap->ezgpx)
Using cached basemap_data-1.3.2-py2.py3-none-any.whl (30.5 MB)
Collecting pyshp<2.4,>=1.2 (from basemap->ezgpx)
Using cached pyshp-2.3.1-py2.py3-none-any.whl (46 kB)
Collecting pyproj<3.6.0,>=1.9.3 (from basemap->ezgpx)
Using cached pyproj-3.5.0-cp311-cp311-macosx_11_0_arm64.whl (5.7 MB)
...
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
Any ideas? Should I start a new issue?
molinav commentedon Aug 3, 2023
Hi @dvvilkins! You can check if the issue is the same as described in #583. The latest Cython 3.0.0 conflicts with the current
_geoslib.pyxfile. A hotfix version 1.3.8 is ongoing but still not released, although you can install directly from thehotfix-1.3.8branch instead ofdevelop. In case it does not work, you can paste the complete traceback to understand the source of the issue.molinav commentedon Dec 6, 2023
I am creating MacOS ARM64 wheels locally before I publish them into PyPI. Is somebody with MacOS ARM64 willing to try them? Then I would be sure that what I am uploading to PyPI is actually working (I am not that experienced with MacOS). I would need to know the target Python that you are using.
The wheels are bundling GEOS 3.6.5, so there would be no need to install anything manually apart from the
basemapwheel itself.tamidodo commentedon Dec 16, 2023
@molinav I have MacOS ARM64 and am having trouble installing basemap because of the issues described above. Would be happy to try it out, I'm on Python 3.9.7.
molinav commentedon Dec 18, 2023
Thanks @tamidodo! I will try to have the wheels ready by end of today. I will attach them here, just with ".zip" extension instead of ".whl" due to GitHub limitations on the message attachments.
What is the environment in which you use Python? From python.org installer, from pyenv+homebrew, from Anaconda/Miniforge?
tamidodo commentedon Dec 18, 2023
Sounds good, I use Anaconda.
molinav commentedon Dec 20, 2023
@tamidodo Sorry for the late reply, I was busier than expected. I attach here the current wheel file for Python 3.9 (you need to remove the .zip at the end after downloading):
basemap-1.4.0.dev0-cp39-cp39-macosx_11_0_arm64.whl.zip
Since you are working with Anaconda, I would suggest to install this wheel without the dependencies, and afterwards install the dependencies manually with
conda(to keep within thecondaecosystem as much as possible):The wheel bundles its own precompiled GEOS dylib, which only depends on system libraries, so I hope it works for you without any tweaking. I am happy to hear any feedback from you!
tamidodo commentedon Dec 21, 2023
So after downloading the file, I changed the filename:
mv basemap-1.4.0.dev0-cp39-cp39-macosx_11_0_arm64.whl.zip basemap-1.4.0.dev0-cp39-cp39-macosx_11_0_arm64.whlAnd then tried to run the first command in my environment with python version 3.9.7 and got this error back:

molinav commentedon Dec 21, 2023
@tamidodo I also get the same error as you when I create a new virtual environment, but in my case it is caused by the
pipdefault version (20.3.4), which is too old, I remember reading somewhere thatmacosx_11_0was not identified as a valid platform for cases in which it should be so. If I upgradepipthen the installation proceeds as expected:There is a couple of differences in my environment with respect to yours: Python 3.9 is installed from the official Python website (universal2 installer), and I am using simple Python virtual environments and
pipto fetch dependencies (noconda). However, I cannot guess why it does not work in your environment, because youpipseems up to date.Some possible things I can be thinking of:
pipwithconda, does it say that it is already up to date (23.3.2)?molinav commentedon Dec 21, 2023
I have just tested with
pyenvinstalled fromhomebrew, in this case usingpyenvto install Python 3.9.7 and then using the wheel works directly because thepipversion is already 21.2.3:I will try now with Anaconda or Miniforge and check.
molinav commentedon Dec 21, 2023
I have just tested with Anaconda downloaded from their website (arm64 installer). I created an environment
mscwith Python version 3.9.7:And then I have tried to install
basemapusing the two-step approach (pipfor the wheel without dependencies,condafor the dependencies added manually):tamidodo commentedon Dec 25, 2023
Sorry for the delay, been busy with holiday things but this was a lovely Christmas surprise! This was what it was, my Anaconda installed Python for x86_64. Got the correct python for arm64 from miniforge and had no issues installing the wheel and getting it running! Thank you for your work on this, seems good to go!
molinav commentedon Dec 27, 2023
@tamidodo One very last update, I managed to prepare the
condapackages for MacOS ARM64 in theconda-forgechannel. So now it should be even simpler as long as your environment stays withinconda-forge, since you can installbasemapwithcondadirectly:And then a simple import test:
I will be closing the issue, since we have
condapackages ofbasemap1.3.9 for MacOS ARM64, and withbasemap1.4.0 I will be uploading the MacOS ARM64 wheels to PyPI too. Thanks for your help and feedback!