turtle模块的安装
今天突然想使用turtle绘制图形,可是在导入turtle模块时却提示错误:
“ImportError: No module named turtle”
解决方法如下:
在超级用户模式下执行命令:
[root@foundation101 ~]# easy_install turtle
出现了三个问题:
- build/temp.linux-x86_64-2.7/check_libyaml.c:2:18: fatal error: yaml.h: No such file or directory
- twisted/test/raiser.c:4:20: fatal error: Python.h: No such file or directory
- error: Setup script exited with error: command ‘gcc’ failed with exit status 1
解决方法:
[root@foundation101 ~]# yum install python-devel gcc -y
完美解决~~~~