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

2018-07-30  本文已影响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

完美解决~~~~

上一篇 下一篇

猜你喜欢

热点阅读