I'm trying to find a simple one-line instruction to create a new project and environment using uv so that I can work up python scripts using VS Code's interactive window. This is in Mac OS.
uv init project_name && cd project_name && uv venv
I then activate the environment using:
source .venv/bin/activate
I then create a simple test file in VS Code, say test.py:
# %%
#The code above is to start up interactive window
import pandas as pd
print("Pandas version:", pd.__version__)
I'm expecting an error because I think I've created a new clean environment. But before that I get an error to say I've not installed ipykernel. Fine. I expect that.
uv add ipykernel
And that works.
But no matter whether I change the interpreter I still get that message:
More puzzling is the fact that I was expecting the one-liner to only be able to access a couple of modules in the new environment.
Yet if I try:
pip list
I see modules outside of that environment scope. What have I got wrong with uv?
