Repository navigation
Errors when installing Basemap in Mac os #447
Description
I'm running these in my Mac' s terminal, with python 3.7.0.
It seems to be some problems with numpy or Cython but I pretty sure I have already installed them.
numpy 1.15.4
Cython 0.29.2
pyproj 1.9.5.1
geos 0.2.1
Above are some relative module that I already have.
Any idea or suggestions?
Yande-MacBook-Air:basemap-1.1.0 yan$ python3 setup.py install
`/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py:274: UserWarning: Unknown distribution option: 'install_requires'
warnings.warn(msg)
/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py:274: UserWarning: Unknown distribution option: 'namespace_packages'
warnings.warn(msg)
running install
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 extension "_geoslib" sources
build_src: building npy-pkg config files
running build_py
running build_ext
customize UnixCCompiler
customize UnixCCompiler using build_ext
building '_geoslib' extension
compiling C sources
C compiler: gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g
compile options: '-Iinclude -I['/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/include'] -I/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c'
gcc: src/_geoslib.c
error: unable to open output file 'build/temp.macosx-10.9-x86_64-3.7/src/_geoslib.o': 'Permission denied'
1 error generated.
error: unable to open output file 'build/temp.macosx-10.9-x86_64-3.7/src/_geoslib.o': 'Permission denied'
1 error generated.
error: Command "gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -Iinclude -I['/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/include'] -I/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c src/_geoslib.c -o build/temp.macosx-10.9-x86_64-3.7/src/_geoslib.o -MMD -MF build/temp.macosx-10.9-x86_64-3.7/src/_geoslib.o.d" failed with exit status 1`
Activity
molinav commentedon Oct 25, 2022
I know that I am coming super-late here, but there has been significant development on the
basemappackaging in the last months. We are still missing precompiled binary wheels for MacOS, but it should be straightforward to install from the source distribution available in PyPI:GEOS_DIRto the installation folder (i.e. thegeos_c.hheader should be found in${GEOS_DIR}/include).basemapwithpipnormally:python -m pip install basemappython -m pip install basemap-data-hiresFeel free to try out and report any issues from following the former steps.
molinav commentedon Jan 6, 2024
I am closing the issue, because with the upcoming release 1.4.0 (in a couple of days) I will be uploading MacOS wheels to PyPI manually, and since release 1.3.9 we already have MacOS arm64 packages in the
conda-forgechannel, so hopefully these installation issues on MacOS will become less common.Feel free to reopen the issue if any of the problems persists.