Your pip and your python are different Pythons. Check:
which python; which pip
python -c "import sys; print(sys.executable)"
Fix it for good with a virtual environment per project:
python3 -m venv .venv
source .venv/bin/activate
python -m pip install python-dotenv
Always install with python -m pip, then it goes to the Python you run. In Cursor: Cmd+Shift+P → "Python: Select Interpreter" → pick .venv, so the Run button uses it too. And uninstall that other dotenv package, it's not the one you want.
which pythonandwhich pipprint? marco_py · edited