3

When I change my project to another conda environment than base environment, python code completion doesn't work anymore for installed modules (like cv2).

I have no problem detecting the environment or running my code though. How can I fix it ?

cnemri
  • 454
  • 4
  • 14

2 Answers2

1

Open your Anaconda Prompt, activate the environment, and then launch VS Code from within the activated environment (i.e. code .).

Brett Cannon
  • 14,438
  • 3
  • 45
  • 40
0

I had the same problem in mac os. The problem was with the "Language Server" setting in the python extension, which is by default "Jedi". I changed it to "pylance" and it solved my problem. To use pylance you have to install the pylance extension.

Tara Mishra
  • 154
  • 8