0

Confusing

The python Idle has email.py opened in it with:

 import pyautogui
 pyautogui.keyDown("t")

when ran:

  Traceback (most recent call last):
     File "C:\Users\ethan\Desktop\emailMaker\email.py", line 1, in <module>
          import pyautogui 
  ModuleNotFoundError: No module named 'pyautogui'

in a CMD terminal I had already executed:

pip install pyautogui && pip3 install pyautogui && python -m pip install pyautogui

they had installed fine in also before the python scripts I opened CMD and typed:

python
>>> import pyautogui
>>> pyautogui.keyDown("t")
>>> t

It was fine... anywho while typing this question I found the answer that made it work so for any one who had the same problem the solution is to execute in CMD this:

py -m pip install pyautogui

Simply the same as "python -m pip install pyautogui" but without the "thon" IDK why this worked so if you know tell me why.

  • 2
    [This](https://stackoverflow.com/questions/50896496/what-is-the-difference-between-py-and-python-in-the-terminal) can be helpful to understand the difference between py and python for Windows terminal. – Muhteva Jul 30 '21 at 05:47

0 Answers0