PYTHON:module ‘turtle’ has no attribute ‘pensize’ python报错:module’turtle’ has no attribute ‘pensiz’ 今天使用命令行运行时报出module’turtle’ has no attribute 'pensiz’的错误, 报错原因:文件名为turtle,所以运行时引用的turtle库其实是自身而不是Python的海归库,所以把文件名改成其他名字就可以了。