When Cursor composer agent (in a python project) is doing something in the current project, it should be using the current venv - it runs things like pip install without activating the current venv, which causes it to modify a global environment.
2 Likes
Are you telling it to use a specific venv?
It works for me. I recently asked it to create a conda environment and use that for the project and it generated and executed commands like this:
source ~/.bash_profile && conda activate torch && pip install torch torchvision torchaudio pytorch-lightning tensorboard albumentations
This is annoying. The Python path selected in “Python: Select Interpreter” is not used.
3 Likes
Yeah this one is hard to navigate around, I can’t run tests without being in the venv and have tried prompting cursor to create a venv within its own context
I created a sub-stack about this with more details but my solution for linux.
Open Command Palette → Preferences: Open User Settings (JSON) and add:
For fish
"terminal.integrated.defaultProfile.linux": "fish",
"terminal.integrated.profiles": {
"fish": { "path": "/usr/bin/fish" }
}
This topic was automatically closed 22 days after the last reply. New replies are no longer allowed.