Error Deploying Python Backend to Railway.app: HDF5 Not Found During netCDF4 Installation
I'm normally deploying my Python Backend to Railway.app for easy hosting. Today I pushed som new features, but it did not finish because of an error. First look for me, it looks like there is something wrong with dockerfile. I hope there are somebody that knows how to fix it.
#10 26.41 Downloading netCDF4-1.6.3.tar.gz (777 kB)
#10 26.42 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 777.5/777.5 kB 480.2 MB/s eta 0:00:00
#10 26.46 Installing build dependencies: started
#10 32.07 Installing build dependencies: finished with status 'done'
#10 32.07 Getting requirements to build wheel: started
#10 32.26 Getting requirements to build wheel: finished with status 'error'
#10 32.27 error: subprocess-exited-with-error
#10 32.27
#10 32.27 × Getting requirements to build wheel did not run successfully.
#10 32.27 │ exit code: 1
#10 32.27 ╰─> [40 lines of output]
#10 32.27 reading from setup.cfg...
#10 32.27 Package hdf5 was not found in the pkg-config search path.
#10 32.27 Perhaps you should add the directory containing `hdf5.pc'
#10 32.27 to the PKG_CONFIG_PATH environment variable
#10 32.27 No package 'hdf5' found
#10 32.27
#10 32.27 HDF5_DIR environment variable not set, checking some standard locations ..
#10 32.27 checking /root/include ...
#10 32.27 hdf5 headers not found in /root/include
#10 32.27 checking /usr/local/include ...
#10 32.27 hdf5 headers not found in /usr/local/include
#10 32.27 checking /sw/include ...
#10 32.27 hdf5 headers not found in /sw/include
#10 32.27 checking /opt/include ...
#10 32.27 hdf5 headers not found in /opt/include
#10 32.27 checking /opt/local/include ...
#10 32.27 hdf5 headers not found in /opt/local/include
#10 32.27 checking /opt/homebrew/include ...
#10 32.27 hdf5 headers not found in /opt/homebrew/include
#10 32.27 checking /usr/include ...
#10 32.27 hdf5 headers not found in /usr/include
#10 32.27 Traceback (most recent call last):
#10 32.27 File "/opt/venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
#10 32.27 main()
#10 32.27 File "/opt/venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
#10 32.27 json_out['return_val'] = hook(**hook_input['kwargs'])
#10 32.27 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#10 32.27 File "/opt/venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
#10 32.27 return hook(config_settings)
#10 32.27 ^^^^^^^^^^^^^^^^^^^^^
#10 32.27 File "/tmp/pip-build-env-r4l0h366/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 334, in get_requires_for_build_wheel
#10 32.27 return self._get_build_requires(config_settings, requirements=[])
#10 32.27 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#10 32.27 File "/tmp/pip-build-env-r4l0h366/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 304, in _get_build_requires
#10 32.27 self.run_setup()
#10 32.27 File "/tmp/pip-build-env-r4l0h366/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 320, in run_setup
#10 32.27 exec(code, locals())
#10 32.27 File "<string>", line 453, in <module>
#10 32.27 File "<string>", line 394, in _populate_hdf5_info
#10 32.27 ValueError: did not find HDF5 headers
#10 32.27 [end of output]