What is wrong with python interpreter?

Hi Guys, I am perplexed about the fact that while running my app.py using the VS code run button, it shows that “No module like tkcalendar is found”, whereas by manually running it through the terminal, the program, works!

This is how the terminal looks. Please relief me with this issue.

Thanks in advance.

This might sound silly, but did you check to confirm, whether that’s the same python interpreter?

Yeah Mate! The code was running in Version 3.7.9 32-bit. But while manually running the script, the code was running in Version 3.8.5 64-bit. Can you elaborate me about this issue which I am facing write now? Cause I don’t want to get such issues in the future.

One more thing @sanity can you explain me what does PS stands for?

In short, one can have multiple python interpreters. Each with their own environments - this means i.e. different installed packages, which will be visible only for python and environment in which it was installed. Just like tkcalendar in here.

As far as preventing this from happening, other than making sure code is run with correct python, there isn’t really much to do. However it might be a good idea to get into habit of making separate environment for each project and configure VS Code to use appropriate one for certain project. With creating virtual environments can help build-in venv python module https://docs.python.org/3.8/library/venv.html

PS means that it is Windows PowerShell.

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