Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem installing turtle
#11
(Nov-10-2018, 10:41 PM)Gribouillis Wrote:
(Nov-10-2018, 10:15 PM)MasterJediKnight7 Wrote: A:\0_ingschool\Courses\Fundamentals of Algorithm\Python\Group Projects\turtle.py
This is most certainly the faulty file. Try to give another name to this file.
This code works:
from turtle import*
forward(120)
left(90)
color('red')
forward(80)
But this two I still have the problem of forward that isn't defined.
from turtle import*

while True:
    foward(1)
    left(1.15)

color("blue")
pensize(4)

for i in range(313):
    foward(2)
    left(1.15)
from turtle import*
myTurtle = turtle.Turtle()
myTurtle.circle(50)
turtle.getscreen()._root.mainloop()
Would it be because the syntax is wrong or the use of the different function incorrect?
Reply
#12
The problem is not with the code, the problem is with the file bearing the same name as the standard module turtle. After each line from turtle import *, add the line import turtle; print(turtle). It should print the path of the files that cause the problem.
Reply
#13
<module 'turtle' from 'C:\\Users\\jedi\\AppData\\Local\\Programs\\Python\\Python37\\lib\\turtle.py'>
Reply
#14
Do it in the program that doesn't work.

Also if you still have a file named turtle.py in the folder A:\0_ingschool\Courses\Fundamentals of Algorithm\Python\Group Projects\, then change its name. Choose seaturtle.py instead.
Reply
#15
For the while True program it gives me this adding the import turtle, print("turtle"):

<module 'turtle' from 'C:\\Users\\jedi\\AppData\\Local\\Programs\\Python\\Python37\\lib\\turtle.py'>
Traceback (most recent call last):
File "A:\0_ingschool\Courses\Fundamentals of Algorithm\Python\Group Projects\", line 5, in <module>
foward(1)
NameError: name 'foward' is not defined
>>>

I have changed all the names of the programs that were had "turtle" in the file .
Reply
#16
I've found the error, look carefully NameError: name 'foward' is not defined

You wrote foward instead of forward!
Reply
#17
Confused Oups.
Sorry about that.
Thanks for your help.
I must have been tired.
Sorry to have taken your time for just that simple error.
Reply
#18
(Nov-10-2018, 07:55 PM)MasterJediKnight7 Wrote: Hi. I have a problem when I try to install the module Turtle.

I can't find anything about that error anywhere.
When I do "pip install turtle", it doesn't work either.
Can someone give me some advice, please?

Here is an example:

[Image: open?id=1OYhZmDtLUdzj4W7uHuTB92noQaDGLBsE]

Python version 3.7.1
pip version:18.1

Heart Heart Heart
Heart Heart Heart
Heart Heart Heart
Hi
this is answer of your problem:
https://stackoverflow.com/questions/7174...tle-module

So you could try this way:

pip install turtle==0.0.1

0.0.1 This is the last version of the library so you should find the version of the library that you want to install for this purpose, you can find the version of the library using this command:

pip show module <name_of_the_library>

another solution that could work is using --use-deprecated=backtrack-on-build-failures

Example:

pip install turtle --use-deprecated=backtrack-on-build-failures

Hope to help you.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [WORKED AROUND] Problem installing elitech-datareader, 'cannot import build_py_2to3' NeilUK 4 1,686 Jul-09-2023, 10:01 AM
Last Post: NeilUK
  Begginer problem with turtle Damien_X 1 2,077 Aug-25-2020, 11:23 AM
Last Post: GOTO10
  Problem Installing rasterio gw1500se 1 2,199 Mar-24-2020, 06:28 PM
Last Post: gw1500se
  Problem installing library thunderspeed 2 2,321 Mar-22-2020, 11:04 PM
Last Post: thunderspeed
  Please help: problem installing/importing langdetect module in Jupyter Notebook ledgreve 3 7,264 Dec-30-2019, 08:17 AM
Last Post: LeanbridgeTech
  Problem installing instaloader ledgreve 21 19,477 Nov-18-2019, 11:28 AM
Last Post: ledgreve
  Problem with installing PyPDF2 Pavel_47 2 6,014 Nov-10-2019, 02:58 PM
Last Post: Pavel_47
  Nested while loop problem + turtle DreamingInsanity 3 2,943 Jul-06-2019, 02:01 PM
Last Post: DreamingInsanity
  wn = turtle.screen() AttributeError: module 'turtle' has no attribute 'screen' Shadower 1 6,171 Feb-06-2019, 01:25 AM
Last Post: woooee
  Problem installing numpy and matplotlib achondrite 1 3,117 Jan-16-2019, 11:43 PM
Last Post: snippsat

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020