作为Python的初学者,我真的不知道我在这里弄错了什么吗?
想与pyautogui一起使用:
>>> import pyautogui
>>> pyautogui.PAUSE = 1
>>> pyautogui.FAILSAFE = True
>>> pyautogui.size()
Traceback (most recent call last):
File "<pyshell#6>", line 1, in <module>
pyautogui.size()
AttributeError: module 'pyautogui' has no attribute 'size'
不知道为什么它不显示我的分辨率?而且在一般情况下pyautogui不能与类似的命令一起工作
>>> pyautogui.moveTo(100, 100, duration=0.25)
Traceback (most recent call last):
File "<pyshell#8>", line 1, in <module>
pyautogui.moveTo(100, 100, duration=0.25)
AttributeError: module 'pyautogui' has no attribute 'moveTo'
>>>
确定安装了pip。
答案 0 :(得分:0)
您自己的名为“ pyautogui.py”的脚本会干扰您安装的模块,因此请重命名其他名称。