No `VIRTUAL_ENV` variable available?
See original GitHub issueDescription:
In an activated Python virtual environment (venv), the environment variable VIRTUAL_ENV
contains the path to the base of the venv. That variable doesn’t exists, and it doesn’t seem possible to activate the environment in the action either? I could pass in that variable but then I’d have to make an assumption about where this Action installs Python on the runner.
Action version: v3, latest
Platform:
- Ubuntu
- macOS
- Windows
Runner type:
- Hosted
- Self-hosted
Tools version: I tried with 3.9 and 3.10 and it failed for both.
Repro steps:
Failed activate:
- https://github.com/jenstroeger/python-package-template/runs/5686105935
- https://github.com/jenstroeger/python-package-template/runs/5686092462
No VIRTUAL_ENV
variable:
Expected behavior:
Either being able to activate the environment (which is tricky from an Action considering the differences between Windows (Scripts/
folder) and Linux/Mac (bin/
folder). Ideally, the VIRTUAL_ENV
would be set?
Actual behavior: The variable isn’t available.
Issue Analytics
- State:
- Created a year ago
- Comments:9 (1 by maintainers)
Top GitHub Comments
@jenstroeger, it’s correct. You can use
GITHUB_ENV
to pass values between steps.@jenstroeger, the setting up and activation of
venv
are not in scope ofsetup-python
action because using ofvenv
is not mandatory for all python developers, someone can use the other tools and packages. The main goal ofsetup-python
action is installation of required python version on the runner.