问题
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
回答1:
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.
回答2:
import turtle
is Python but not PowerShell. Make sure you are in Python, not PowerShell, when you do import turtle
.
来源:https://stackoverflow.com/questions/29738967/cant-import-turtle