[英]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,我正在尝试在我的 powershell 上添加乌龟,因为这就是我正在阅读的书所说的,但这显示出来了,
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.您不在 Python 解释器中。 You have to start it up, generally by entering the command
py
.您必须启动它,通常是通过输入命令
py
。 Then you can use the Python environment.然后就可以使用Python环境了。
import turtle
is Python but not PowerShell. import turtle
是 Python 但不是 PowerShell。 Make sure you are in Python, not PowerShell, when you do import turtle
.执行
import turtle
时,请确保您使用的是 Python,而不是 PowerShell。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.