0

I Made a Simple Program using pyautogui:

import pyautogui

pyautogui.write('Hello world!') 

But when I run it I get this Error:

Traceback (most recent call last):
File "C:/Users/*****/Miscellaneous/Python projects/simple_pyautogui_program.py", line 3, in <module>
pyautogui.write('Hello world!')
AttributeError: module 'pyautogui' has no attribute 'write'

Is there a way to solve this or should I use pyautogui.press()?

Bento Bean
  • 1
  • 1
  • 1

2 Answers2

3
  1. pip install pyautogui
  2. change file name to main.py
0

I had the same Problem. Reinstalling pyautogui solved it for me.

pip uninstall pyautogui  
py install pyautogui
MD Mushfirat Mohaimin
  • 1,966
  • 3
  • 10
  • 22