Skip to content

Github Action to install uv and create a virtual environment

Notifications You must be signed in to change notification settings

andgineer/uv-venv

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

uv-venv

Github Action to install uv and create a virtual environment.

Compatible with Unix and Windows.


Why

This action prevents Windows installation errors that occur when using uv without a virtual environment:

error: failed to remove file `C:\hostedtoolcache\windows\Python\3.10.11\x64\Lib\site-packages\../../Scripts/uv.exe`
  Caused by: Access is denied. (os error 5)

The error occurs because uv attempts to modify the global Python environment, which is restricted in GitHub Actions.

Usage

    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v3
      with:
        python-version: ${{ matrix.python-version }}
        
    - name: Setup uv
      uses: andgineer/uv-venv@v3

    - name: Install dependencies
      run: uv pip install -r requirements.dev.txt

Examples

About

Github Action to install uv and create a virtual environment

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published