Python Forum

Full Version: Is this normal?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi everyone
I am a newbie so bear with me, I watched a youtube video on how to install PYAutoGUI, I believe its installed it correctly but now I want to upload the library I get the error message

>>>import pyautogui
Traceback (most recent call ):
File "<stdin> line 1 in <module>
ModuleNotFound: No module name 'pyautogui'

is this normal?

Thank you for your help.
Check the version of python you installed it for. The error is saying it's not installed.
Best practice is to create a virtual environment activate it and install there.

It is normal if you have not installed pyautogui. pyautogui is not part of the standard python distribution and must be installed separately.

This is what happens when I type your command on my computer:
Output:
PS C:\Users\djhys\Documents\python\musings> python Python 3.11.1 (tags/v3.11.1:a7a450f, Dec 6 2022, 19:58:39) [MSC v.1934 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import pyautogui Traceback (most recent call last): File "<stdin>", line 1, in <module> ModuleNotFoundError: No module named 'pyautogui' >>>
Now I install pyautogui. pyauto gui is a pretty big install, so I'm leaving out much of the output.
Output:
PS C:\Users\djhys\Documents\python\musings> pip install pyautogui Collecting pyautogui Downloading PyAutoGUI-0.9.54.tar.gz (61 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.2/61.2 kB 1.6 MB/s eta 0:00:00 Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Collecting pymsgbox (from pyautogui) Downloading PyMsgBox-1.0.9.tar.gz (18 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Collecting pytweening>=1.0.4 (from pyautogui) Downloading pytweening-1.2.0.tar.gz (171 kB) . . . much left out here ' ' ' Successfully built pyautogui pygetwindow pyscreeze pytweening mouseinfo pymsgbox pyrect Installing collected packages: pytweening, pyrect, pymsgbox, pyscreeze, pygetwindow, mouseinfo, pyautogui Successfully installed mouseinfo-0.1.3 pyautogui-0.9.54 pygetwindow-0.0.9 pymsgbox-1.0.9 pyrect-0.2.0 pyscreeze-1.0.1 pytweening-1.2.0 PS C:\Users\djhys\Documents\python\musings>
And now I try to import the module again.
Output:
PS C:\Users\djhys\Documents\python\musings> python Python 3.11.1 (tags/v3.11.1:a7a450f, Dec 6 2022, 19:58:39) [MSC v.1934 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import pyautogui >>>