My requirements look like this, so the wheel is used when on Windows (local machine) but ignored when on Linux (Github/Viktor):
viktor==13.8.0
./local-whls/GDAL-3.4.3-cp310-cp310-win_amd64.whl; platform_system == "Windows"
./local-whls/rasterio-1.2.10-cp310-cp310-win_amd64.whl; platform_system == "Windows"
gdal==3.4.3; platform_system != "Windows"
rasterio==1.2.10; platform_system != "Windows"
geopandas==0.12.2
This results in this GDAL error:
Collecting viktor==13.8.0
Downloading viktor-13.8.0-cp310-cp310-manylinux2014_x86_64.whl (30.8 MB)
βββββββββββββββββββββββββββββββββββββββ 30.8/30.8 MB 234.5 MB/s eta 0:00:00
Collecting gdal==3.4.3
Downloading GDAL-3.4.3.tar.gz (757 kB)
βββββββββββββββββββββββββββββββββββββ 757.6/757.6 kB 355.1 MB/s eta 0:00:00
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'error'
error: subprocess-exited-with-error
Γ python setup.py egg_info did not run successfully.
β exit code: 1
β°β> [126 lines of output]
WARNING: numpy not available! Array support will not be enabled
running egg_info
creating /tmp/pip-pip-egg-info-xizxg1wx/GDAL.egg-info
writing /tmp/pip-pip-egg-info-xizxg1wx/GDAL.egg-info/PKG-INFO
writing dependency_links to /tmp/pip-pip-egg-info-xizxg1wx/GDAL.egg-info/dependency_links.txt
writing requirements to /tmp/pip-pip-egg-info-xizxg1wx/GDAL.egg-info/requires.txt
writing top-level names to /tmp/pip-pip-egg-info-xizxg1wx/GDAL.egg-info/top_level.txt
writing manifest file '/tmp/pip-pip-egg-info-xizxg1wx/GDAL.egg-info/SOURCES.txt'
Traceback (most recent call last):
File "/tmp/pip-install-_6p2hmob/gdal_b087abaacd4f42e19bea18d75244a645/setup.py", line 105, in fetch_config
p = subprocess.Popen([command, args], stdout=subprocess.PIPE)
File "/opt/hostedtoolcache/Python/3.10.10/x64/lib/python3.10/subprocess.py", line 971, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/opt/hostedtoolcache/Python/3.10.10/x64/lib/python3.10/subprocess.py", line 1847, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '../../apps/gdal-config'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/tmp/pip-install-_6p2hmob/gdal_b087abaacd4f42e19bea18d75244a645/setup.py", line 188, in get_gdal_config
return fetch_config(option, gdal_config=self.gdal_config)
File "/tmp/pip-install-_6p2hmob/gdal_b087abaacd4f42e19bea18d75244a645/setup.py", line 108, in fetch_config
raise gdal_config_error(e)
__main__.gdal_config_error: [Errno 2] No such file or directory: '../../apps/gdal-config'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/tmp/pip-install-_6p2hmob/gdal_b087abaacd4f42e19bea18d75244a645/setup.py", line 105, in fetch_config
p = subprocess.Popen([command, args], stdout=subprocess.PIPE)
File "/opt/hostedtoolcache/Python/3.10.10/x64/lib/python3.10/subprocess.py", line 971, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/opt/hostedtoolcache/Python/3.10.10/x64/lib/python3.10/subprocess.py", line 1847, 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 "/tmp/pip-install-_6p2hmob/gdal_b087abaacd4f42e19bea18d75244a645/setup.py", line 195, in get_gdal_config
return fetch_config(option)
File "/tmp/pip-install-_6p2hmob/gdal_b087abaacd4f42e19bea18d75244a645/setup.py", line 108, in fetch_config
raise gdal_config_error(e)
__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 "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/tmp/pip-install-_6p2hmob/gdal_b087abaacd4f42e19bea18d75244a645/setup.py", line 389, in <module>
setup(**setup_kwargs)
File "/opt/hostedtoolcache/Python/3.10.10/x64/lib/python3.10/site-packages/setuptools/__init__.py", line 87, in setup
return distutils.core.setup(**attrs)
File "/opt/hostedtoolcache/Python/3.10.10/x64/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 185, in setup
return run_commands(dist)
File "/opt/hostedtoolcache/Python/3.10.10/x64/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
dist.run_commands()
File "/opt/hostedtoolcache/Python/3.10.10/x64/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 968, in run_commands
self.run_command(cmd)
File "/opt/hostedtoolcache/Python/3.10.10/x64/lib/python3.10/site-packages/setuptools/dist.py", line 1217, in run_command
super().run_command(command)
File "/opt/hostedtoolcache/Python/3.10.10/x64/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
cmd_obj.run()
File "/opt/hostedtoolcache/Python/3.10.10/x64/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 308, in run
self.find_sources()
File "/opt/hostedtoolcache/Python/3.10.10/x64/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 316, in find_sources
mm.run()
File "/opt/hostedtoolcache/Python/3.10.10/x64/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 560, in run
self.add_defaults()
File "/opt/hostedtoolcache/Python/3.10.10/x64/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 597, in add_defaults
sdist.add_defaults(self)
File "/opt/hostedtoolcache/Python/3.10.10/x64/lib/python3.10/site-packages/setuptools/command/sdist.py", line 106, in add_defaults
super().add_defaults()
File "/opt/hostedtoolcache/Python/3.10.10/x64/lib/python3.10/site-packages/setuptools/_distutils/command/sdist.py", line 252, in add_defaults
self._add_defaults_ext()
File "/opt/hostedtoolcache/Python/3.10.10/x64/lib/python3.10/site-packages/setuptools/_distutils/command/sdist.py", line 336, in _add_defaults_ext
build_ext = self.get_finalized_command('build_ext')
File "/opt/hostedtoolcache/Python/3.10.10/x64/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 306, in get_finalized_command
cmd_obj.ensure_finalized()
File "/opt/hostedtoolcache/Python/3.10.10/x64/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 109, in ensure_finalized
self.finalize_options()
File "/tmp/pip-install-_6p2hmob/gdal_b087abaacd4f42e19bea18d75244a645/setup.py", line 258, in finalize_options
self.gdaldir = self.get_gdal_config('prefix')
File "/tmp/pip-install-_6p2hmob/gdal_b087abaacd4f42e19bea18d75244a645/setup.py", line 201, in get_gdal_config
raise gdal_config_error(traceback_string + '\n' + msg)
__main__.gdal_config_error: Traceback (most recent call last):
File "/tmp/pip-install-_6p2hmob/gdal_b087abaacd4f42e19bea18d75244a645/setup.py", line 105, in fetch_config
p = subprocess.Popen([command, args], stdout=subprocess.PIPE)
File "/opt/hostedtoolcache/Python/3.10.10/x64/lib/python3.10/subprocess.py", line 971, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/opt/hostedtoolcache/Python/3.10.10/x64/lib/python3.10/subprocess.py", line 1847, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '../../apps/gdal-config'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/tmp/pip-install-_6p2hmob/gdal_b087abaacd4f42e19bea18d75244a645/setup.py", line 188, in get_gdal_config
return fetch_config(option, gdal_config=self.gdal_config)
File "/tmp/pip-install-_6p2hmob/gdal_b087abaacd4f42e19bea18d75244a645/setup.py", line 108, in fetch_config
raise gdal_config_error(e)
gdal_config_error: [Errno 2] No such file or directory: '../../apps/gdal-config'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/tmp/pip-install-_6p2hmob/gdal_b087abaacd4f42e19bea18d75244a645/setup.py", line 105, in fetch_config
p = subprocess.Popen([command, args], stdout=subprocess.PIPE)
File "/opt/hostedtoolcache/Python/3.10.10/x64/lib/python3.10/subprocess.py", line 971, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/opt/hostedtoolcache/Python/3.10.10/x64/lib/python3.10/subprocess.py", line 1847, 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 "/tmp/pip-install-_6p2hmob/gdal_b087abaacd4f42e19bea18d75244a645/setup.py", line 195, in get_gdal_config
return fetch_config(option)
File "/tmp/pip-install-_6p2hmob/gdal_b087abaacd4f42e19bea18d75244a645/setup.py", line 108, in fetch_config
raise gdal_config_error(e)
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: metadata-generation-failed
Γ Encountered error while generating package metadata.
β°β> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
Error: Process completed with exit code 1.
For testing the --no-binary with Rasterio flag I removed the GDAL-requirement (since otherwise an error is already raised at GDAL installation, before Rasterio installation is executed), results in this error:
Collecting rasterio==1.2.10
Downloading rasterio-1.2.10.tar.gz (2.3 MB)
ββββββββββββββββββββββββββββββββββββββββ 2.3/2.3 MB 204.6 MB/s eta 0:00:00
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'error'
error: subprocess-exited-with-error
Γ Getting requirements to build wheel did not run successfully.
β exit code: 1
β°β> [2 lines of output]
WARNING:root:Failed to get options via gdal-config: [Errno 2] No such file or directory: 'gdal-config'
ERROR: A GDAL API version must be specified. Provide a path to gdal-config using a GDAL_CONFIG environment variable or use a GDAL_VERSION environment variable.
[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.
Error: Process completed with exit code 1.