P
P
Python Newbie2021-07-15 12:15:53
Python
Python Newbie, 2021-07-15 12:15:53

How to properly import pyautogui on python 3.9.6?

How to properly import pyautogui on python 3.9.6?

I write in the console pip3 install pyautoguiand get

Requirement already satisfied: pyautogui in c:\users\дом\appdata\local\programs\python\python39\lib\site-packages (0.9.53)
Requirement already satisfied: pymsgbox in c:\users\дом\appdata\local\programs\python\python39\lib\site-packages (from pyautogui) (1.0.7)
Requirement already satisfied: PyTweening>=1.0.1 in c:\users\дом\appdata\local\programs\python\python39\lib\site-packages (from pyautogui) (1.0.3)
Requirement already satisfied: pyscreeze>=0.1.21 in c:\users\дом\appdata\local\programs\python\python39\lib\site-packages (from pyautogui) (0.1.26)
Requirement already satisfied: pygetwindow>=0.0.5 in c:\users\дом\appdata\local\programs\python\python39\lib\site-packages (from pyautogui) (0.0.9)
Requirement already satisfied: mouseinfo in c:\users\дом\appdata\local\programs\python\python39\lib\site-packages (from pyautogui) (0.1.3)
Requirement already satisfied: pyrect in c:\users\дом\appdata\local\programs\python\python39\lib\site-packages (from pygetwindow>=0.0.5->pyautogui) (0.1.4)
Requirement already satisfied: pyperclip in c:\users\дом\appdata\local\programs\python\python39\lib\site-packages (from mouseinfo->pyautogui) (1.8.2)


Further in sublime text I write
import pyautogui as pg

pg.move(50, 50)
and save. After launch I get an error
Traceback (most recent call last):
  File "C:\Users\Дом\Desktop\Py\index.py", line 1, in <module>
    import pyautogui
  File "C:\Users\Дом\AppData\Local\Programs\Python\Python39\lib\site-packages\pyautogui\__init__.py", line 221, in <module>
    locateOnWindow.__doc__ = pyscreeze.locateOnWindow.__doc__
AttributeError: module 'pyscreeze' has no attribute 'locateOnWindow'
That the pyscreeze module does not have the locateOnWindow attribute.

But what is pyscreeze here if I have pyautogui?

help me please

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
Yakovlev Daniil, 2021-07-16
@Kil0Gramm

try to write pip uninstall pyautogui, and then pip install pyautoguiif it doesn't work then press WIN Rand enter

c:\users\дом\appdata\local\programs\python\python39\lib\site-packages

If it doesn't work then remove python 3.9 and download python 3.7.9

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question