Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot install in a virtual env when GDAL is not available #80

Closed
sandorkertesz opened this issue Nov 22, 2024 · 0 comments · Fixed by ecmwf/earthkit-transforms#37
Closed
Assignees
Labels
bug Something isn't working

Comments

@sandorkertesz
Copy link
Collaborator

sandorkertesz commented Nov 22, 2024

What happened?

When I try to install earthkit into a fresh venv with

pip install earthkit

it fails with the error posted below. This happens because rasterio, which is a mandatory dependency for earthkit-transforms, fails. It seems to require GDAL to be installed.

Collecting rasterio (from earthkit-transforms>=0.3.4->earthkit==0.6.3)
  Using cached rasterio-1.4.2.tar.gz (441 kB)
  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
  ╰─> [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.
 
[notice] A new release of pip is available: 24.2 -> 24.3.1
[notice] To update, run: pip install --upgrade 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.

What are the steps to reproduce the bug?

Try pip install earthkit in a freshly created venv.

Version

latest

Platform (OS and architecture)

MacBook Pro, MacOS 13.6.1, Python 3.12.5

Relevant log output

No response

Accompanying data

No response

Organisation

No response

@sandorkertesz sandorkertesz added the bug Something isn't working label Nov 22, 2024
@sandorkertesz sandorkertesz changed the title Cannot install in a virtual env Cannot install in a virtual env when GDAL is not available Nov 22, 2024
@sandorkertesz sandorkertesz self-assigned this Nov 22, 2024
@EddyCMWF EddyCMWF self-assigned this Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants