Ashish Prasad
Ashish Prasad

Reputation: 11

importing turtle module in VS Code gives ModuleNotFoundError: 'tkinter'

I am trying to import turtle module. but it shows me module name 'tkinter' is not found. although it is a built-in module.and i didnt import it directly.(i think turtle module imports tkinter for me.)

I tried changing the path for Python in VS Code by clicking the bottom left option is status bar.

other modules are getting imported(import random, etc)

I have attached the screenshot of the code and error i am getting. Please HELPPP!!!!

The Code I am trying to run

The Error I am getting

Upvotes: 1

Views: 1218

Answers (1)

Dilmi Kottachchi
Dilmi Kottachchi

Reputation: 19

It can also be an import error that you facing with you IDE (VS Code). Try changing the target exe to the python interpreter in your virtual environment. You can learn more about this, by visiting the link below:

https://medium.com/nerd-for-tech/import-errors-in-python-no-module-named-module-name-for-vs-code-887d1f78cf02

Upvotes: 1

Related Questions