Support for Python3 (pip3)
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.
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.
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.
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.