from turtle import を実行しようとしたところ、
File "<stdin>", line 1
from turtle import
^
SyntaxError: invalid syntax が表示されできません。
$sudo port install py34-tkinter もしてあるのですがうまくいきません。
また、
import turtle
turtle.forward(100) としてみたところ
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<string>", line 6, in forward
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/turtle.py", line 3812, in init
Turtle._screen = Screen()
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/turtle.py", line 3662, in Screen
Turtle._screen = _Screen()
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/turtle.py", line 3678, in init
_Screen._root = self._root = _Root()
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/turtle.py", line 434, in init
TK.Tk.init(self)
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/tkinter/init.py", line 1856, in init
self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: no display name and no $DISPLAY environment variable
となってしまいます。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/10/03 14:57
2019/10/03 15:08
2019/10/03 15:21