question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ModuleNotFoundError: No module named 'pyautogui' on Python 3.8.6

See original GitHub issue

I tried creating exe multiple times, each time after running the output file it gave me ModuleNotFoundError: No module named 'pyautogui' . It runs perfectly with .py file and I do not have more than 1 version of Python installed. pyautogui is also installed but it seems that it doesn’t compile while creating exe using autopytoexe.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
brentvollebregtcommented, Jan 18, 2021

@aquib-sh did you read the help post that I wrote up that is linked in the README, in the top of the UI and at the bottom of the UI after packaging a script?

Searching for “ModuleNotFoundError” in this post helped me immediately find the heading “ModuleNotFoundError: No module named x / ImportError: No module named x”. I highly recommend giving this a read (that is why I have put it in so many places).

From the post:

To fix this in the UI, open the advanced tab and find the --hidden-import input. Simply paste the module name into this input and then repackage. If the original error is still appearing, you have done this incorrectly.

Alternatively, if you have put the module in here and the error is still occurring, make sure that the library you’re trying to add is installed in the same distribution of Python that auto-py-to-exe is using - I have seen quite a few people get confused by this kind of situation before.

0reactions
aquib-shcommented, Jan 20, 2021

I am putting the detailed solution here of how I was able to solve this issue.

After hidden import it gave Gave Bootloader not precompiled error

steps taken: cloning the pyinstaller github repo python setup.py install cd bootloader python ./waf all --target-arch=64bit

placed the folder of output to exception in windows antivirus

adding modules to hidden import that had problem: pyautogui wave aifc pyaudio

THIS SOLVED THE ISSUE, HOPE SOMEONE WILL FIND USEFUL.

Read more comments on GitHub >

github_iconTop Results From Across the Web

import error for pyautogui - python - Stack Overflow
I installed it using pip3 install pyautogui . It supposedly installed but still gave error: No module named 'pyautogui', when I tried to...
Read more >
No module named 'pyautogui' in all IDEs no matter what I try ...
I've tried (but to no success):. Installing pyautogui, pillow, plotly, matplotlib; Changing pyCharm's Python interpreter to /usr/bin/python3.9 ( ...
Read more >
Installation - PyAutoGUI documentation - Read the Docs
To install PyAutoGUI, install the pyautogui package from PyPI by running pip install pyautogui (on Windows) or pip3 install pyautogui (on macOS and...
Read more >
Pyautogui Not Importing "No Module Named ... - ADocLib
Python Error: No module named pyautogui. This is probably because you don't have package PyAutoGUI installed. You can install it in command line ......
Read more >
ModuleNotFoundError: No module named 'pyautogui' - Reddit
re-install the module into one of the directories listed there · update PYTHONPATH to include the location where it's currently installed. In ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found