getcursor / cursor

The AI Code Editor
https://cursor.com
24.12k stars 1.51k forks source link

Python using global evironment rather than already activated virtual environment #2202

Open ddxv opened 1 day ago

ddxv commented 1 day ago

1) If you can, please include a screenshot of your problem

image

(.virtualenv) ➜  backend git:(main) which python
/home/james/app-store-dash/backend/.virtualenv/bin/python

(.virtualenv) ➜  backend git:(main) python
Python 3.12.0 (main, Oct  3 2023, 09:01:32) [GCC 12.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

>>> import site
>>> print(site.getsitepackages())
['/usr/local/lib/python3.12/site-packages']

2) Please include the name of your operating system Ubuntu 24.0.4.1

3) If you can, steps to reproduce are super helpful

  1. Open the shell, activate a virtual environment
  2. Verify the virtualenv with which python
  3. Enter python repl, check location of python site-packages. For me they are the global site packages.
ddxv commented 1 day ago

This does seem heavily related to a similar issue with conda environments #1791