Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
228 views
in Technique[技术] by (71.8m points)

python - No module named 'tkinter' - error coming up

I've been trying to run a certain turtle code in my visual studio 2019 community edition.

but I've been getting this error again and again. P.S. Normal python is working all fine on the VS ide.

error

  Message=No module named 'tkinter'

  Source=D:visual studiopython trialsday6trialexampleexampleexample.py
  StackTrace:

  File "D:visual studiopython trialsday6trialexampleexampleexample.py", line 1, in <module>
    
from turtle import *

the code I've been trying to run is :

from turtle import *


speed(0)

bgcolor('black')

x = 1

while x < 400:

     colormode(255) # this is something that is irrelevant at this point
                # check the pythondocs link at the end for more info


     pencolor(255,255,255) # changes the color of the pen to the rgb coordinates
                     # obtained by the variables r, g, b changing each time

     fd(50 + x)
     rt(90.911)


     x = x+1 

exitonclick() 

This problem has been occuring since , I installed nodejs and vscode in my laptop.

please help out.

question from:https://stackoverflow.com/questions/65881885/no-module-named-tkinter-error-coming-up

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...