问题描述
Terminal saying pyautogui is already installed,yet not recognizing it as a command
Code throwing error: Import "pyautogui" could not be resolved
免责声明:除了基本语法课程之外,我几乎没有 Python 经验,而且我是个菜鸟。
我试图创建一个垃圾邮件机器人,作为基于 this video 的朋友的恶作剧。代码很简单,但由于某种原因不起作用。终端说模块安装成功,但没有将其识别为命令,并且代码抛出导入错误。以下是要重现的完整代码:
import pyautogui,time
time.sleep(5)
f = open("lol","r")
for word in f:
pyautogui.typewrite(word)
pyautogui.press("enter")