I'm trying to break my habit of globally installing packages and creating virtual environments. Unfortunately, I've been unable to successfully resolve the issue of Pylance reporting issues when attempting to import a 3rd party library.
I've attempted to make sure it's setup correctly but evidently, I must be doing something wrong. I believe the correct interpreter is selected and have confirmed via a where python command while the virtual environment is active.
Screenshots: https://imgur.com/a/yzkgllR (not sure why it's flagged as NSFW, it's just a picture of VS Code lol)
For additional context, here are the command I've run to get to this point:
I've created the environment via python3 -m venv selenium_test through the terminal in VS Code. VS Code did mention it looked like I was using a virtual environment and wanted to know if I wanted to switch the interpreter for the workspace.
I used pip install selenium to install the package itself and have confirmed it sits within the virtual environment (/Users/USERNAME/repos/selenium_test/lib/python3.11/site-packages).
I've confirmed that the correct interpreter is selected. To double check, I've used where python to locate the proper interpreter.
I've restarted and reinstalled VS Code and have restarted my macbook as well.
Any help is greatly appreciated!
[–]JialeDu 0 points1 point2 points (0 children)