JackMcKew / pyinstaller-action-linux

Github Action for building executables with Pyinstaller for Linux
MIT License
28 stars 21 forks source link

/entrypoint.sh: line 41: pip: command not found #1

Closed OldIMP closed 4 years ago

OldIMP commented 4 years ago

I've set up a mini python project w/ everything under the root directory & the standard Python application workflow + pyinstaller-action-linux.

Then I got the following error while running the step Package Application:

Run JackMcKew/pyinstaller-action-linux@main
  with:
    path: .
    pypi_url: https://pypi.python.org/
    pypi_index_url: https://pypi.python.org/simple
  env:
    pythonLocation: /opt/hostedtoolcache/Python/3.8.5/x64
/usr/bin/docker run --name cbfc173e8ff88d40fdaedd3eb49ee07891_c6a113 --label 8118cb --workdir /github/workspace --rm -e pythonLocation -e INPUT_PATH -e INPUT_PYPI_URL -e INPUT_PYPI_INDEX_URL -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/volksschule/volksschule":"/github/workspace" 8118cb:fc173e8ff88d40fdaedd3eb49ee07891  "." "https://pypi.python.org/" "https://pypi.python.org/simple"
/entrypoint.sh: line 41: pip: command not found

I've tried both release 0.1.0 & main. Both had the same error.

OldIMP commented 4 years ago

Changing path to / will throw another error: /entrypoint.sh: line 41: pip: command not found, which I assume is due to the lack of pyinstaller as dependency, which was already listed in requirements.txt. So I assume path: / is just wrong.

ThePieBandit commented 4 years ago

I'm hitting the same exact issue: /entrypoint.sh: line 41: pip: command not found If I change everything and move it under a src directory, i get /entrypoint.sh: line 47: pyinstaller: command not found.

JackMcKew commented 4 years ago

Thank you for raising this! I'll look into it

JackMcKew commented 4 years ago

@OldIMP @ThePieBandit

This bug has now been fixed 👍 The issue was stemming from the linux docker containing running within a linux docker container, and then mounting within. After the mount had been complete, the path variables that bash relies on had gone strange.

To fix this, I've put in entrypoint.sh to specifically look in the pyenv folder for the pip installation.

Furthermore, please find a fork of the example repo with the updated action (https://github.com/JackMcKew/volksschule/tree/master/.github/workflows). The changes neccessary are a pyinstaller path of . and an artifact path of dist/linux.

Currently the action looks for the first .spec file, so multiple executables will not be created with this action.

JackMcKew commented 4 years ago

@OldIMP

I've just released version 0.1.3 which will let you specify a .spec file if you have multiple spec files in your directory (like volksschule)

Hope it helps! 😄