简体   繁体   中英

Can't import turtle

I'm a complete novice, so I appreciate the answers.
I'm trying to get turtle on my powershell, because that's what the book I'm reading says to do but this shows up,

import : The term 'import' is not recognized as the name of a cmdlet,function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ import turtle
+ ~~~~~~
+ CategoryInfo          : ObjectNotFound: (import:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

You're not in the Python interpreter. You have to start it up, generally by entering the command py . Then you can use the Python environment.

import turtle is Python but not PowerShell. Make sure you are in Python, not PowerShell, when you do import turtle .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM