美文网首页
3.初识少儿编程之turtle库的使用

3.初识少儿编程之turtle库的使用

作者: 为啥要创业 | 来源:发表于2018-07-30 16:36 被阅读0次

turtle模块的安装

今天突然想使用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

完美解决~~~~

相关文章

网友评论

      本文标题:3.初识少儿编程之turtle库的使用

      本文链接:https://www.haomeiwen.com/subject/hsbfvftx.html