Skip to content

Missing the step regarding 'interactive Python' when setting up the Complete workflow #5

Description

@saaraaz

There is one missing step in the setup when using uv with VS Code, especially for Interactive Python (Jupyter).

After creating a project with uv, the project uses a local virtual environment (.venv) based on the system’s Python (e.g., via pyenv). However, VS Code often defaults to the global Python interpreter instead of the project’s .venv.

This causes a mismatch:

  • Running scripts via uv run works correctly (uses .venv)
  • Interactive Python / Jupyter fails with ModuleNotFoundError because it uses the global interpreter without installed packages

Missing step:
Users need to explicitly select the project interpreter in VS Code:

Python: Select Interpreter
→ Choose: .venv/bin/python (project environment)

This ensures both script execution and interactive mode use the same environment.

Without this step, beginners may encounter confusing import errors despite correct setup.


Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions