Please note that I am not using Docker container. I ran pip install GDAL==3.10.2 and I got the following error.
root@94276ae1d814:/home/site/wwwroot# pip install GDAL==3.10.2
Collecting GDAL==3.10.2
Downloading gdal-3.10.2.tar.gz (838 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 838.1/838.1 kB 41.3 MB/s eta 0:00:00
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [88 lines of output]
/tmp/pip-build-env-9ngbd8f1/overlay/lib/python3.10/site-packages/setuptools/config/_apply_pyprojecttoml.py:81: SetuptoolsWarning: `extras_require` overwritten in `pyproject.toml` (optional-dependencies)
corresp(dist, value, root_dir)
Using numpy 2.2.3
running egg_info
writing gdal-utils/GDAL.egg-info/PKG-INFO
writing dependency_links to gdal-utils/GDAL.egg-info/dependency_links.txt
writing entry points to gdal-utils/GDAL.egg-info/entry_points.txt
writing requirements to gdal-utils/GDAL.egg-info/requires.txt
writing top-level names to gdal-utils/GDAL.egg-info/top_level.txt
Traceback (most recent call last):
File "<string>", line 91, in fetch_config
File "/opt/python/3.10.16/lib/python3.10/subprocess.py", line 971, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/opt/python/3.10.16/lib/python3.10/subprocess.py", line 1863, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'gdal-config'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 231, in get_gdal_config
File "<string>", line 94, in fetch_config
__main__.gdal_config_error: [Errno 2] No such file or directory: 'gdal-config'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/python/3.10.16/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 389, in <module>
main()
File "/opt/python/3.10.16/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 373, in main
json_out["return_val"] = hook(**hook_input["kwargs"])
File "/opt/python/3.10.16/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 143, in get_requires_for_build_wheel
return hook(config_settings)
File "/tmp/pip-build-env-9ngbd8f1/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 334, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=[])
File "/tmp/pip-build-env-9ngbd8f1/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 304, in _get_build_requires
self.run_setup()
File "/tmp/pip-build-env-9ngbd8f1/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 320, in run_setup
exec(code, locals())
File "<string>", line 437, in <module>
File "/tmp/pip-build-env-9ngbd8f1/overlay/lib/python3.10/site-packages/setuptools/__init__.py", line 117, in setup
return distutils.core.setup(**attrs)
File "/tmp/pip-build-env-9ngbd8f1/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 186, in setup
return run_commands(dist)
File "/tmp/pip-build-env-9ngbd8f1/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 202, in run_commands
dist.run_commands()
File "/tmp/pip-build-env-9ngbd8f1/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 1002, in run_commands
self.run_command(cmd)
File "/tmp/pip-build-env-9ngbd8f1/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 999, in run_command
super().run_command(command)
File "/tmp/pip-build-env-9ngbd8f1/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 1021, in run_command
cmd_obj.run()
File "/tmp/pip-build-env-9ngbd8f1/overlay/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 312, in run
self.find_sources()
File "/tmp/pip-build-env-9ngbd8f1/overlay/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 320, in find_sources
mm.run()
File "/tmp/pip-build-env-9ngbd8f1/overlay/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 543, in run
self.add_defaults()
File "/tmp/pip-build-env-9ngbd8f1/overlay/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 581, in add_defaults
sdist.add_defaults(self)
File "/tmp/pip-build-env-9ngbd8f1/overlay/lib/python3.10/site-packages/setuptools/command/sdist.py", line 109, in add_defaults
super().add_defaults()
File "/tmp/pip-build-env-9ngbd8f1/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/sdist.py", line 245, in add_defaults
self._add_defaults_ext()
File "/tmp/pip-build-env-9ngbd8f1/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/sdist.py", line 329, in _add_defaults_ext
build_ext = self.get_finalized_command('build_ext')
File "/tmp/pip-build-env-9ngbd8f1/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 334, in get_finalized_command
cmd_obj.ensure_finalized()
File "/tmp/pip-build-env-9ngbd8f1/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 135, in ensure_finalized
self.finalize_options()
File "<string>", line 315, in finalize_options
File "<string>", line 237, in get_gdal_config
__main__.gdal_config_error: Traceback (most recent call last):
File "<string>", line 91, in fetch_config
File "/opt/python/3.10.16/lib/python3.10/subprocess.py", line 971, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/opt/python/3.10.16/lib/python3.10/subprocess.py", line 1863, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'gdal-config'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 231, in get_gdal_config
File "<string>", line 94, in fetch_config
gdal_config_error: [Errno 2] No such file or directory: 'gdal-config'
Could not find gdal-config. Make sure you have installed the GDAL native library and development headers.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel 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.
root@94276ae1d814:/home/site/wwwroot#
Please assist. I am stuck at GDAL so not even trying GRASS GIS yet.