Предпосылка: у меня есть MacBook Pro с Catalina (10.15.4), я установил: python 3.7 и библиотеку GDAL 2.4 и Qgis 3.12. (Я не использую anaconda или miniconda, и я установил homebrew)
Все связано с трудностью выполнения определенного проекта, который берет данные о Corona Virus Italia из Github и обрабатывает их ежедневно с помощью Qgis (https://github.com/pigreco/COVID-19_ITA).
Как видите, проект был создан как для windows, так и для OSX, для его запуска необходимо установить плагин DataPloty.
проблема с Python 3.7
В течение многих дней я пытался понять эту проблему с python3 при попытке установить gdal, который не позволяет мне просматривать обработку графики:
pip3 install gdal
Collecting gdal
Using cached GDAL-3.0.4.tar.gz (577 kB)
Installing collected packages: gdal
Running setup.py install for gdal ... error
ERROR: Command errored out with exit status 1:
command: /Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/6v/3ynq2r2d2f7gtj6rvb0kw2s00000gn/T/pip-install-on9vchph/gdal/setup.py'"'"'; __file__='"'"'/private/var/folders/6v/3ynq2r2d2f7gtj6rvb0kw2s00000gn/T/pip-install-on9vchph/gdal/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/6v/3ynq2r2d2f7gtj6rvb0kw2s00000gn/T/pip-record-z5yq4g0d/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m/gdal
cwd: /private/var/folders/6v/3ynq2r2d2f7gtj6rvb0kw2s00000gn/T/pip-install-on9vchph/gdal/
Complete output (84 lines):
running install
running build
running build_py
creating build
creating build/lib.macosx-10.6-intel-3.7
copying gdal.py -> build/lib.macosx-10.6-intel-3.7
copying ogr.py -> build/lib.macosx-10.6-intel-3.7
copying osr.py -> build/lib.macosx-10.6-intel-3.7
copying gdalconst.py -> build/lib.macosx-10.6-intel-3.7
copying gdalnumeric.py -> build/lib.macosx-10.6-intel-3.7
creating build/lib.macosx-10.6-intel-3.7/osgeo
copying osgeo/gnm.py -> build/lib.macosx-10.6-intel-3.7/osgeo
copying osgeo/__init__.py -> build/lib.macosx-10.6-intel-3.7/osgeo
copying osgeo/gdalnumeric.py -> build/lib.macosx-10.6-intel-3.7/osgeo
copying osgeo/osr.py -> build/lib.macosx-10.6-intel-3.7/osgeo
copying osgeo/gdal.py -> build/lib.macosx-10.6-intel-3.7/osgeo
copying osgeo/ogr.py -> build/lib.macosx-10.6-intel-3.7/osgeo
copying osgeo/gdal_array.py -> build/lib.macosx-10.6-intel-3.7/osgeo
copying osgeo/gdalconst.py -> build/lib.macosx-10.6-intel-3.7/osgeo
Fixing build/lib.macosx-10.6-intel-3.7/gdal.py build/lib.macosx-10.6-intel-3.7/ogr.py build/lib.macosx-10.6-intel-3.7/osr.py build/lib.macosx-10.6-intel-3.7/gdalconst.py build/lib.macosx-10.6-intel-3.7/gdalnumeric.py build/lib.macosx-10.6-intel-3.7/osgeo/gnm.py build/lib.macosx-10.6-intel-3.7/osgeo/__init__.py build/lib.macosx-10.6-intel-3.7/osgeo/gdalnumeric.py build/lib.macosx-10.6-intel-3.7/osgeo/osr.py build/lib.macosx-10.6-intel-3.7/osgeo/gdal.py build/lib.macosx-10.6-intel-3.7/osgeo/ogr.py build/lib.macosx-10.6-intel-3.7/osgeo/gdal_array.py build/lib.macosx-10.6-intel-3.7/osgeo/gdalconst.py
Skipping optional fixer: ws_comma
Fixing build/lib.macosx-10.6-intel-3.7/gdal.py build/lib.macosx-10.6-intel-3.7/ogr.py build/lib.macosx-10.6-intel-3.7/osr.py build/lib.macosx-10.6-intel-3.7/gdalconst.py build/lib.macosx-10.6-intel-3.7/gdalnumeric.py build/lib.macosx-10.6-intel-3.7/osgeo/gnm.py build/lib.macosx-10.6-intel-3.7/osgeo/__init__.py build/lib.macosx-10.6-intel-3.7/osgeo/gdalnumeric.py build/lib.macosx-10.6-intel-3.7/osgeo/osr.py build/lib.macosx-10.6-intel-3.7/osgeo/gdal.py build/lib.macosx-10.6-intel-3.7/osgeo/ogr.py build/lib.macosx-10.6-intel-3.7/osgeo/gdal_array.py build/lib.macosx-10.6-intel-3.7/osgeo/gdalconst.py
Skipping optional fixer: ws_comma
running build_ext
gcc -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch i386 -arch x86_64 -g -I/usr/local/opt/openssl@1.1/include -I../../port -I../../gcore -I../../alg -I../../ogr/ -I../../ogr/ogrsf_frmts -I../../gnm -I../../apps -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -I/Users/tony/Library/Python/3.7/lib/python/site-packages/numpy/core/include -I/Library/Frameworks/GDAL.framework/Versions/2.4/include -c gdal_python_cxx11_test.cpp -o gdal_python_cxx11_test.o
gcc -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch i386 -arch x86_64 -g -I/usr/local/opt/openssl@1.1/include -I../../port -I../../gcore -I../../alg -I../../ogr/ -I../../ogr/ogrsf_frmts -I../../gnm -I../../apps -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -I/Users/tony/Library/Python/3.7/lib/python/site-packages/numpy/core/include -I/Library/Frameworks/GDAL.framework/Versions/2.4/include -c gdal_python_cxx11_test.cpp -o gdal_python_cxx11_test.o -std=c++11
creating var
creating var/folders
creating var/folders/6v
creating var/folders/6v/3ynq2r2d2f7gtj6rvb0kw2s00000gn
creating var/folders/6v/3ynq2r2d2f7gtj6rvb0kw2s00000gn/T
gcc -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch i386 -arch x86_64 -g -I/usr/local/opt/openssl@1.1/include -I../../port -I../../gcore -I../../alg -I../../ogr/ -I../../ogr/ogrsf_frmts -I../../gnm -I../../apps -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -I/Users/tony/Library/Python/3.7/lib/python/site-packages/numpy/core/include -I/Library/Frameworks/GDAL.framework/Versions/2.4/include -c /var/folders/6v/3ynq2r2d2f7gtj6rvb0kw2s00000gn/T/tmpvdsuhy2e.cpp -o var/folders/6v/3ynq2r2d2f7gtj6rvb0kw2s00000gn/T/tmpvdsuhy2e.o -Wno-error=unused-command-line-argument-hard-error-in-future
warning: unknown warning option '-Werror=unused-command-line-argument-hard-error-in-future'; did you mean '-Werror=unused-command-line-argument'? [-Wunknown-warning-option]
warning: include path for stdlibc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
2 warnings generated.
warning: unknown warning option '-Werror=unused-command-line-argument-hard-error-in-future'; did you mean '-Werror=unused-command-line-argument'? [-Wunknown-warning-option]
warning: include path for stdlibc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
2 warnings generated.
gcc -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch i386 -arch x86_64 -g -I/usr/local/opt/openssl@1.1/include -I../../port -I../../gcore -I../../alg -I../../ogr/ -I../../ogr/ogrsf_frmts -I../../gnm -I../../apps -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -I/Users/tony/Library/Python/3.7/lib/python/site-packages/numpy/core/include -I/Library/Frameworks/GDAL.framework/Versions/2.4/include -c /var/folders/6v/3ynq2r2d2f7gtj6rvb0kw2s00000gn/T/tmp64x28hgt.cpp -o var/folders/6v/3ynq2r2d2f7gtj6rvb0kw2s00000gn/T/tmp64x28hgt.o -Wno-error=unused-command-line-argument-hard-error-in-future
warning: unknown warning option '-Werror=unused-command-line-argument-hard-error-in-future'; did you mean '-Werror=unused-command-line-argument'? [-Wunknown-warning-option]
warning: include path for stdlibc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
2 warnings generated.
warning: unknown warning option '-Werror=unused-command-line-argument-hard-error-in-future'; did you mean '-Werror=unused-command-line-argument'? [-Wunknown-warning-option]
warning: include path for stdlibc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
2 warnings generated.
gcc -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch i386 -arch x86_64 -g -I/usr/local/opt/openssl@1.1/include -I../../port -I../../gcore -I../../alg -I../../ogr/ -I../../ogr/ogrsf_frmts -I../../gnm -I../../apps -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -I/Users/tony/Library/Python/3.7/lib/python/site-packages/numpy/core/include -I/Library/Frameworks/GDAL.framework/Versions/2.4/include -c /var/folders/6v/3ynq2r2d2f7gtj6rvb0kw2s00000gn/T/tmp99_tg082.cpp -o var/folders/6v/3ynq2r2d2f7gtj6rvb0kw2s00000gn/T/tmp99_tg082.o -Wno-error=unused-command-line-argument-hard-error-in-future
warning: unknown warning option '-Werror=unused-command-line-argument-hard-error-in-future'; did you mean '-Werror=unused-command-line-argument'? [-Wunknown-warning-option]
warning: include path for stdlibc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
2 warnings generated.
warning: unknown warning option '-Werror=unused-command-line-argument-hard-error-in-future'; did you mean '-Werror=unused-command-line-argument'? [-Wunknown-warning-option]
warning: include path for stdlibc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
2 warnings generated.
gcc -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch i386 -arch x86_64 -g -I/usr/local/opt/openssl@1.1/include -I../../port -I../../gcore -I../../alg -I../../ogr/ -I../../ogr/ogrsf_frmts -I../../gnm -I../../apps -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -I/Users/tony/Library/Python/3.7/lib/python/site-packages/numpy/core/include -I/Library/Frameworks/GDAL.framework/Versions/2.4/include -c /var/folders/6v/3ynq2r2d2f7gtj6rvb0kw2s00000gn/T/tmpv4ct3en1.cpp -o var/folders/6v/3ynq2r2d2f7gtj6rvb0kw2s00000gn/T/tmpv4ct3en1.o -Wno-error=unused-command-line-argument-hard-error-in-future
warning: unknown warning option '-Werror=unused-command-line-argument-hard-error-in-future'; did you mean '-Werror=unused-command-line-argument'? [-Wunknown-warning-option]
warning: include path for stdlibc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
2 warnings generated.
warning: unknown warning option '-Werror=unused-command-line-argument-hard-error-in-future'; did you mean '-Werror=unused-command-line-argument'? [-Wunknown-warning-option]
warning: include path for stdlibc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
2 warnings generated.
gcc -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch i386 -arch x86_64 -g -I/usr/local/opt/openssl@1.1/include -I../../port -I../../gcore -I../../alg -I../../ogr/ -I../../ogr/ogrsf_frmts -I../../gnm -I../../apps -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -I/Users/tony/Library/Python/3.7/lib/python/site-packages/numpy/core/include -I/Library/Frameworks/GDAL.framework/Versions/2.4/include -c /var/folders/6v/3ynq2r2d2f7gtj6rvb0kw2s00000gn/T/tmpcxsk3ylh.cpp -o var/folders/6v/3ynq2r2d2f7gtj6rvb0kw2s00000gn/T/tmpcxsk3ylh.o -Wno-error=unused-command-line-argument-hard-error-in-future
warning: unknown warning option '-Werror=unused-command-line-argument-hard-error-in-future'; did you mean '-Werror=unused-command-line-argument'? [-Wunknown-warning-option]
warning: include path for stdlibc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
2 warnings generated.
warning: unknown warning option '-Werror=unused-command-line-argument-hard-error-in-future'; did you mean '-Werror=unused-command-line-argument'? [-Wunknown-warning-option]
warning: include path for stdlibc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
2 warnings generated.
gcc -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch i386 -arch x86_64 -g -I/usr/local/opt/openssl@1.1/include -I../../port -I../../gcore -I../../alg -I../../ogr/ -I../../ogr/ogrsf_frmts -I../../gnm -I../../apps -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -I/Users/tony/Library/Python/3.7/lib/python/site-packages/numpy/core/include -I/Library/Frameworks/GDAL.framework/Versions/2.4/include -c /var/folders/6v/3ynq2r2d2f7gtj6rvb0kw2s00000gn/T/tmpxeugvpxr.cpp -o var/folders/6v/3ynq2r2d2f7gtj6rvb0kw2s00000gn/T/tmpxeugvpxr.o -Wno-error=unused-command-line-argument-hard-error-in-future
warning: unknown warning option '-Werror=unused-command-line-argument-hard-error-in-future'; did you mean '-Werror=unused-command-line-argument'? [-Wunknown-warning-option]
warning: include path for stdlibc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
2 warnings generated.
warning: unknown warning option '-Werror=unused-command-line-argument-hard-error-in-future'; did you mean '-Werror=unused-command-line-argument'? [-Wunknown-warning-option]
warning: include path for stdlibc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
2 warnings generated.
building 'osgeo._gdal' extension
creating build/temp.macosx-10.6-intel-3.7
creating build/temp.macosx-10.6-intel-3.7/extensions
gcc -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch i386 -arch x86_64 -g -I/usr/local/opt/openssl@1.1/include -I../../port -I../../gcore -I../../alg -I../../ogr/ -I../../ogr/ogrsf_frmts -I../../gnm -I../../apps -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -I/Users/tony/Library/Python/3.7/lib/python/site-packages/numpy/core/include -I/Library/Frameworks/GDAL.framework/Versions/2.4/include -c extensions/gdal_wrap.cpp -o build/temp.macosx-10.6-intel-3.7/extensions/gdal_wrap.o -std=c++11 -Wno-error=unused-command-line-argument-hard-error-in-future -I/Library/Frameworks/GDAL.framework/Versions/2.4/Headers
warning: unknown warning option '-Werror=unused-command-line-argument-hard-error-in-future'; did you mean '-Werror=unused-command-line-argument'? [-Wunknown-warning-option]
warning: include path for stdlibc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
extensions/gdal_wrap.cpp:3096:10: fatal error: 'stdexcept' file not found
#include <stdexcept>
^~~~~~~~~~~
2 warnings and 1 error generated.
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/6v/3ynq2r2d2f7gtj6rvb0kw2s00000gn/T/pip-install-on9vchph/gdal/setup.py'"'"'; __file__='"'"'/private/var/folders/6v/3ynq2r2d2f7gtj6rvb0kw2s00000gn/T/pip-install-on9vchph/gdal/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/6v/3ynq2r2d2f7gtj6rvb0kw2s00000gn/T/pip-record-z5yq4g0d/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m/gdal Check the logs for full command output