turtle模块的安装

来源:互联网 发布:手机淘宝抢拍技巧 编辑:程序博客网 时间:2024/05/18 01:32

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

完美解决~~~~

0 0
原创粉丝点击