作为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。
您自己的名为"pyautogui.py"的脚本正在干扰您安装的模块,因此请用其他方法重命名它。