0

I have tried to install tkinter in python 3 as sudo yum install tkinter

But it's saying that could not find a version that satisfies the requirement tkinter from versions no matching distribution found on tkinter

I was trying to run turtle programs in python script. But it's running on python prompt when I am coming to the python script its not running. So i tried to download tkinter.

noɥʇʎԀʎzɐɹƆ
  • 9,967
  • 2
  • 50
  • 67

1 Answers1

0

comments section

You've named your file turtle.py, and when you write import turtle, turtle.py is attempting to import itself. You can solve this by renaming turtle.py to something else, such as myturtle.py.

noɥʇʎԀʎzɐɹƆ
  • 9,967
  • 2
  • 50
  • 67
  • I had done that also .i named it as alex.py .. but something else is happening .. traceback is like ..14 priyabrata ray PRIYABRATA RAY Priyabrata Ray 3 Traceback (most recent call last): File "alex.py", line 1, in import turtle ImportError: bad magic number in 'turtle': b'\x03\xf3\r\n' – priyabrata ray Feb 02 '20 at 20:03
  • And also I don't know about first 4 line .. and where it is coming from – priyabrata ray Feb 02 '20 at 20:05
  • Try removing `.pyc` files https://stackoverflow.com/questions/52477683/importerror-bad-magic-number-in-time-b-x03-xf3-r-n-in-django – noɥʇʎԀʎzɐɹƆ Feb 02 '20 at 20:07
  • Okay and please tell me about those first 4 lines .. where did they coming from .. not only in this program .. in most of the error cases those line prints .I don't know why – priyabrata ray Feb 02 '20 at 20:11
  • You can google for what "traceback" and "ImportError" means. It's all been written about. – noɥʇʎԀʎzɐɹƆ Feb 02 '20 at 21:49