Question about Interpreter for Virtual Environment


I’m following the Python Tutorial for Beginners by Dave on YT, chapter 21 timestamp 7:20.

I did everything exactly like Dave, but I noticed that in my bottom right, it just says the Python version whereas for him it says the version and then (‘.venv’: venv) which I presume means I am using the global interpreter instead of the one for my virtual environment. I tried troubleshooting that online and with ChatGPT and I keep having this issue. This also caused problems when I installed dotenv and tried importing it, and when I ran the file it said “ModuleNotFoundError: No module named ‘dotenv’”, even though I installed it on my virtual enviornment. I worked around that by just installing dotenv globally, but I’m guessing I should learn how to use the interpreter in the virtual environment specifically? Does anyone know how to do that on Mac?

Would really appreciate any help or advice.

A link for setting up a virtual env on mac

If you are using an editor, you will need to look at its’ docs. On vscode pressing ctl+shift+p brings up a screen and type python create virtual env. Then follow the prompts.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.