pip-action icon indicating copy to clipboard operation
pip-action copied to clipboard

Support for Python3 (pip3)

Open kenorb opened this issue 5 years ago • 3 comments

Is it possible to install packages for Python 3?

I've tried:

      - uses: BSFishy/pip-action@v1
        with:
          packages: |
            html.parser

but by default it's using Python 2.

kenorb avatar Dec 29 '20 13:12 kenorb

Did you try using uses: actions/setup-python@v2 instead of uses: actions/setup-python@v1 listed in README.md? See https://github.com/actions/setup-python for more details.

cfc603 avatar Dec 29 '20 15:12 cfc603

As @cfc603 said, make sure you install Python 3 using the correct action. This action first checks if an environment variable named pythonLocation exists (which I believe should be set by the setup-python action), and if that doesn't exist, it will check if python is in the path. I think by default the actions runner has Python installed, which may be the issue if you're not setting it up explicitly.

BSFishy avatar Dec 29 '20 21:12 BSFishy

IIUC, pythonLocation sets the path, not the binary. On Ubuntu, there is no python binary without a version suffix. We use self-hosted Ubuntu servers.

maguro avatar Feb 04 '22 03:02 maguro