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

Getting error "attempting to execute the process .../pip" #719

Open
2 of 5 tasks
tomdtp opened this issue Aug 23, 2023 · 4 comments
Open
2 of 5 tasks

Getting error "attempting to execute the process .../pip" #719

tomdtp opened this issue Aug 23, 2023 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@tomdtp
Copy link

tomdtp commented Aug 23, 2023

Description:
I am receiving an error message when running the CI, which is:

Run actions/setup-python@v4

/usr/bin/docker exec  47d5533689e05c9f17b55f1237300dc760ccb1afc3a7608da7cde431b7a12dc3 sh -c "cat /etc/*release | grep ^ID"
Installed versions
/__t/Python/3.10.12/x64/bin/pip cache dir

Error: There was an error when attempting to execute the process '/__t/Python/3.10.12/x64/bin/pip'. This may indicate the process failed to start. Error: spawn /__t/Python/3.10.12/x64/bin/pip ENOENT

Action version:
v4

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Tools version:
3.10.12

Repro steps:
I am using a container based on https://github.com/OSGeo/gdal/pkgs/container/gdal (ubuntu-small-latest) in my build. I had to install lsb_release already to get it running, but now I am getting the error mentioned above.

In my action I am using:

    steps:
      - name: Checkout
        uses: actions/checkout@v3
      - uses: actions/setup-python@v4
        with:
          python-version: "3.10"
          cache: "pip"

Expected behavior:
It should work just fine.

Actual behavior:
It fails with the error mentioned above.

@tomdtp tomdtp added bug Something isn't working needs triage labels Aug 23, 2023
@dmitry-shibanov
Copy link
Contributor

Hello @tomdtp. Thank you for your report. We'll take a look at the issue.

@alukach
Copy link

alukach commented Sep 12, 2023

Getting a similar error when trying to set up Python with caching enabled after installing lsb_release. This feels like an extension of #556.

test.yaml
name: Tests

on:
  - push

jobs:
  test:
    runs-on: ubuntu-latest
    container:
      image: python:3.11.1
    defaults:
      run:
        working-directory: ./app

    env:
      DB_ENGINE: django.contrib.gis.db.backends.postgis
      # ... Rm'd for brevity

    services:
      postgres:
        image: postgis/postgis:13-3.2
        env:
          POSTGRES_DB: db
          POSTGRES_USER: postgres
          POSTGRES_PASSWORD: postgres
        options: >-
          --health-cmd pg_isready
          --health-interval 10s
          --health-timeout 5s
          --health-retries 5
        ports:
          - 5432:5432

    steps:
      - uses: actions/checkout@v2

      - name: Install GDAL
        run: |
          apt-get update -y
          apt-get install -y libgdal-dev lsb-release
          apt-get clean all

      - name: Setup Python
        uses: actions/setup-python@v4
        with:
          python-version: 3.11.5
          cache: pip

      # ... Rm'd for brevity
Build Output
Run actions/setup-python@v4
  with:
    python-version: 3.11.5
    cache: pip
    check-latest: false
    token: ***
    update-environment: true
    allow-prereleases: false
  env:
    DB_ENGINE: django.contrib.gis.db.backends.postgis
/usr/bin/docker exec  f4a9c232bcec12996e4393e33b93ed4b06b33a83f39bb6fe1edd4eec2c86e62c sh -c "cat /etc/*release | grep ^ID"
Installed versions
  Successfully set up CPython (3.11.5)
/__t/Python/3.11.5/x64/bin/pip cache dir
Error: There was an error when attempting to execute the process '/__t/Python/3.11.5/x64/bin/pip'. This may indicate the process failed to start. Error: spawn /__t/Python/3.11.5/x64/bin/pip ENOENT

@krishnakumarg1984
Copy link

I have the same error. I am using a fairly small base container too.

@agajdosi
Copy link

Same error, is there any workaround or fix for this?

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

No branches or pull requests

5 participants