I am having trouble figuring out venv and getting my Python script to import libraries in Vscode. I set up a virtual environment and imported libraries necessary (matplotlib). I've activate the scripts in venv using .venv\activate, and set my interpreter to ..venv\Scripts\python.exe . However, my Jupiter notebook still is saying that the module is not imported. Any tips on how I can fix this? Attached is a screenshot. enter image description here
Asked
Active
Viewed 431 times
0
-
Please provide exact steps of what you do ([mcve]) and a (preferably textual) representation of output you receive. As a new user here, also take the [tour] and read [ask]. BTW: I suspect that you are mixing up processes and one has the venv activated and the other doesn't. – Ulrich Eckhardt Dec 21 '21 at 18:14
-
Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Dec 30 '21 at 10:59
1 Answers
0
If you want to switch the python interpreter of the Jupyter Notebook, you need to click the top-right of the Jupyter Notebook. The activate in the terminal only works on the terminal.

Steven-MSFT
- 7,438
- 1
- 5
- 13