Reputation: 41
I have read import error for pyautogui and this did not answer my question. I am trying to import pyautogui via the 3.5.2 shell or windows cmd. but when using the shell for: import pyautogui
Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module>
import pyautogui
ImportError: No module named 'pyautogui'
I have seen people say they resolved by using 3.5 but not for me. I have also seen people say that uninstalling and reinstalling can fix issues. I did this and on reinstall made sure that the path option was selected.
Upvotes: 4
Views: 13859
Reputation: 333
Try doing pip install pyautogui
and if it says all requirements are satisfied type in pip show pyautogui
and if it shows then just try restarting your IDE and it should work
Upvotes: 1
Reputation: 353
Check that you are installing the package using the correct Python Version, in the documentation says that you have to install correspondant to your python version. In my case, I fixed it using python 3.9 (and making sure that my intepreter in VSC is set to Python 3.9.1)
Upvotes: 1
Reputation: 21
Step one: open windows cmd
Step two: and type in py -3.8 -m pip install pyautogui
You will most likely get a message that says: pip is not up to date
, it would look like this: https://i.sstatic.net/DOfzQ.png
if you get this error Type in: py -m pip install --upgrade pip
Step three: Open: https://bootstrap.pypa.io/get-pip.py and copy everything on this page
Step four: Open IDLE and run what you just copied
Step five: Open windows cmd again and try py -3.8 -m pip install pyautogui
again
Step six: Now try to run it again.
if this doesnt work please show us the errors you get.
Upvotes: 2