-
Notifications
You must be signed in to change notification settings - Fork 20
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
Enable creation of venv with existing python version #217
Comments
@xmatthias How did you determine that a 2nd copy of python is installed in this case? I want to start using this setup with v5 version of the action and I don't see anything in the logs that would suggest that an extra python version is installed. Here's what I see:
And this is the YAML: - name: Set Up Python
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}
- name: Set up uv
uses: astral-sh/setup-uv@v5
with:
version: 0.5.x
python-version: ${{ inputs.python-version }} |
seems like you're right - though logs don't actually show this 3.10 setup (no
vs. 3.11 setup (this one is with the setup python action upfront).
In the subsequent step - i then run
vs. 3.10 (installed via UV):
The only place you can tell you're now using a "uv" python is by having the path point to This is good - as it means behavior is already the way i expect it source run: |
I agree it would be great to have better logs. Perhaps you could modify the title of this issue and the original message accordingly? |
the FAQ specifically mentions:
So as a consequence - i'm trying to use that - but use the
astral-sh/setup-uv
function to install UV.Unfortunately, there seems to be no way to have uv setup a virtual environment - all while reusing the existing python installation.
The only way i found was through passing in
python-version: ${{ matrix.python-version }}
- but that installs a 2nd copy of python alongside the one installed viaactions/setup-python
- so contradicts the above FAQ entry (i could remove the setup-python action as it's python ain't used).current workaround
(note: the below is for the windows variant - others will need slightly different workarounds)
Desired solution:
A flag/parameter to allow UV to use the existing python installed via setup-python - but still do the venv magic (create venv, aktivate for the rest of the job, caching, ...)
The text was updated successfully, but these errors were encountered: