@
Sylv Python 3 的错误提示
```Python
Traceback (most recent call last):
File "C:/Python/
test.py", line 1, in <module>
from turtle import *
File "C:/Python\
turtle.py", line 3, in <module>
color("red", "blue")
NameError: name 'color' is not defined
```
Python 2.7 的错误提示
```Python
cd /root/workspace ; env PYTHONIOENCODING=UTF-8 PYTHONUNBUFFERED=1 /usr/bin/python /root/.local/share/code-server/extensions/ms-python.python-2019.6.24221/pythonFiles/
ptvsd_launcher.py --default --client --host localhost --port 41197 /root/workspace/
python2_turtle.py Traceback (most recent call last):
File "/root/.local/share/code-server/extensions/ms-python.python-2019.6.24221/pythonFiles/
ptvsd_launcher.py", line 43, in <module>
main(ptvsdArgs)
File "/root/.local/share/code-server/extensions/ms-python.python-2019.6.24221/pythonFiles/lib/python/ptvsd/
__main__.py", line 434, in main
run()
File "/root/.local/share/code-server/extensions/ms-python.python-2019.6.24221/pythonFiles/lib/python/ptvsd/
__main__.py", line 312, in run_file
runpy.run_path(target, run_name='__main__')
File "/usr/lib/python2.7/
runpy.py", line 252, in run_path
return _run_module_code(code, init_globals, run_name, path_name)
File "/usr/lib/python2.7/
runpy.py", line 82, in _run_module_code
mod_name, mod_fname, mod_loader, pkg_name)
File "/usr/lib/python2.7/
runpy.py", line 72, in _run_code
exec code in run_globals
File "/root/workspace/
python2_turtle.py", line 1, in <module>
import turtle
File "/usr/lib/python2.7/lib-tk/
turtle.py", line 107, in <module>
import Tkinter as TK
File "/usr/lib/python2.7/lib-tk/
Tkinter.py", line 42, in <module>
raise ImportError, str(msg) + ', please install the python-tk package'
ImportError: No module named _tkinter, please install the python-tk package
➜ workspace cd /root/workspace ; env PYTHONIOENCODING=UTF-8 PYTHONUNBUFFERED=1 /usr/bin/python /root/.local/share/code-server/extensions/ms-python.python-2019.6.24221/pythonFiles/
ptvsd_launcher.py --default --client --host localhost --port 48877 /root/workspace/
python2_turtle.py Traceback (most recent call last):
File "/root/.local/share/code-server/extensions/ms-python.python-2019.6.24221/pythonFiles/
ptvsd_launcher.py", line 43, in <module>
main(ptvsdArgs)
File "/root/.local/share/code-server/extensions/ms-python.python-2019.6.24221/pythonFiles/lib/python/ptvsd/
__main__.py", line 434, in main
run()
File "/root/.local/share/code-server/extensions/ms-python.python-2019.6.24221/pythonFiles/lib/python/ptvsd/
__main__.py", line 312, in run_file
runpy.run_path(target, run_name='__main__')
File "/usr/lib/python2.7/
runpy.py", line 252, in run_path
return _run_module_code(code, init_globals, run_name, path_name)
File "/usr/lib/python2.7/
runpy.py", line 82, in _run_module_code
mod_name, mod_fname, mod_loader, pkg_name)
File "/usr/lib/python2.7/
runpy.py", line 72, in _run_code
exec code in run_globals
File "/root/workspace/
python2_turtle.py", line 1, in <module>
import turtle
File "/usr/lib/python2.7/lib-tk/
turtle.py", line 107, in <module>
import Tkinter as TK
File "/usr/lib/python2.7/lib-tk/
Tkinter.py", line 42, in <module>
raise ImportError, str(msg) + ', please install the python-tk package'
ImportError: No module named _tkinter, please install the python-tk package
```