Skip to content

VS Code settings possibly using uv virtual environment Python interpreter #13

Description

@irenecortinovis

To be discussed: eg.
"python.defaultInterpreterPath": "/usr/local/bin/python",
--> "python.defaultInterpreterPath": "/workspace/exopet/.venv/bin/python",

Activity

  1. c-vigo commented on Dec 10, 2025

    @c-vigo
    Contributor

    Why would you want a virtual environment when you can use the devcontainer one?

  2. irenecortinovis commented on Dec 12, 2025

    @irenecortinovis
    Author

    Need to add this line to the container file:
    export UV_PROJECT_ENVIRONMENT=/usr/local/
    (else uv sync creates a virtual environment), and re-publish the image

    Also need to make PROJECT_ROOT available in post-create.sh (add PROJECT_ROOT="/workspace/exopet")


    With this setup, one can then use a project with a pyproject.toml file and uv.lock file, and install dependencies from myproject.toml in the post-create.sh by setting:

    # Install dependencies from pyproject.toml   
    cd $PROJECT_ROOT
    uv sync
    

    and while in the container, one can add any new package by doing

    uv add <package>
    uv sync
    
  3. added
    feature
    on Dec 12, 2025
  4. added theissue type on Dec 12, 2025
  5. added this to the 0.2 milestone on Dec 12, 2025
  6. self-assigned this
    on Dec 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

feature

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions