ethanfox27
ethanfox27

Reputation: 897

VSCode not detecting Python Virtual Environment on Mac OS

VS Code refuses to use the virtual environment on my Mac.
I believe it has to do with the fact that Python doesn't get added directly to the venv but as a shortcut instead.

enter image description here

How can I make it so VSCode recognizes my virtual environment?

Upvotes: 1

Views: 1331

Answers (2)

Carlos
Carlos

Reputation: 111

In my case I had to open the project folder on the same workspace. Than, worked. Example: I had: folderProject/app/venv. When I open the folder project and try load venv, it doen´t work. But with I open app as my workspace and venv inside app folder everything work,

Upvotes: 0

ethanfox27
ethanfox27

Reputation: 897

After about 50 times of trying this, it finally worked.

"python.pythonPath": "env/venv/bin/python3.9"

Upvotes: 1

Related Questions