0

I am trying to install PyAutoGui with pip. But I am getting the following error. And I took solutions where I found from the website. But doesn't work. How do I fix it?

    Collecting pyautogui
      Using cached PyAutoGUI-0.9.52.tar.gz (55 kB)
    Collecting pygetwindow>=0.0.5
      Using cached PyGetWindow-0.0.9.tar.gz (9.7 kB)
    Collecting pyscreeze>=0.1.21
      Using cached PyScreeze-0.1.26.tar.gz (23 kB)
    Requirement already satisfied: Pillow>=5.2.0 in c:\python3.7.5\lib\site-packages (from pyscreeze>=0.1.21->pyautogui) (7.2.0)
    Collecting PyTweening>=1.0.1
      Using cached PyTweening-1.0.3.zip (15 kB)
    Collecting mouseinfo
      Using cached MouseInfo-0.1.3.tar.gz (10 kB)
    Collecting pymsgbox
      Using cached PyMsgBox-1.0.9.tar.gz (18 kB)
      Installing build dependencies ... done
      Getting requirements to build wheel ... error
      ERROR: Command errored out with exit status 1:
       command: 'c:\python3.7.5\python.exe' 'c:\python3.7.5\lib\site-packages\pip\_vendor\pep517\_in_process.py' get_requires_for_build_wheel 'C:\Users\jok\AppData\Local\Temp\tmphnplb_km'
           cwd: C:\Users\jok\AppData\Local\Temp\pip-install-nk1qswzu\pymsgbox_9f69453ee22a4dfb9679747e2ef1ea47
      Complete output (13 lines):
      Fatal Python error: initsite: Failed to import the site module
      Traceback (most recent call last):
        File "c:\python3.7.5\lib\site.py", line 579, in <module>
          main()
        File "c:\python3.7.5\lib\site.py", line 572, in main
          execsitecustomize()
        File "c:\python3.7.5\lib\site-packages\certifi_win32\bootstrap.py", line 37, in _execsitecustomize
          _register_bootstrap_functions()
        File "c:\python3.7.5\lib\site-packages\certifi_win32\bootstrap.py", line 25, in _register_bootstrap_functions
          from . import wrapt_certifi, wrapt_pip
        File "c:\python3.7.5\lib\site-packages\certifi_win32\wrapt_certifi.py", line 3, in <module>
          import wrapt
      ModuleNotFoundError: No module named 'wrapt'
      ----------------------------------------
    ERROR: Command errored out with exit status 1: 'c:\python3.7.5\python.exe' 'c:\python3.7.5\lib\site-packages\pip\_vendor\pep517\_in_process.py' get_requires_for_build_wheel 'C:\Users\jok\AppData\Local\Temp\tmphnplb_km' Check the logs for full command output.**
Rafid Aslam
  • 305
  • 3
  • 10
  • Which website did you mean in your question? Is it the PyAutoGUI docs? (https://pyautogui.readthedocs.io/en/latest/install.html) – Rafid Aslam Jan 06 '21 at 06:07
  • 1
    You should consider banning "It's not working" from your vocabulary on Q&A sites like SO, at least when used on its own. [It does not accurately describe your problem](http://idownvotedbecau.se/itsnotworking/) – Zeitounator Jan 06 '21 at 13:53
  • Try `pip install wrapt` – phd Jan 06 '21 at 14:34
  • @RafidAslam (Stackoverflow). – JW_BLINK Jan 06 '21 at 23:39
  • @Zeitounator Good point. Thanks~ – JW_BLINK Jan 06 '21 at 23:45
  • @phd I already did the suggestion and failed. – JW_BLINK Jan 06 '21 at 23:47
  • FYI, there are some similar questions to this, mentioning the same issue -- `ModuleNotFoundError: No module named 'wrapt'` (https://stackoverflow.com/q/62680281/6156700, https://stackoverflow.com/q/62677593/6156700), so it seems like your installation procedure is already correct. I personally still can't figure out what's causing it. – Rafid Aslam Jan 07 '21 at 00:11
  • 1
    @RafidAslam I just found that there is no python file on the path (%Appdata%) when I followed your suggestion. ;;;Thanks a lot~ – JW_BLINK Jan 07 '21 at 00:26

0 Answers0