5

I'm trying to install Pyautogui on ubuntu 18.04, but I keep receiving the following error message:

$pip3 install pyautogui

Collecting pyautogui
  Using cached https://files.pythonhosted.org/packages/45/70/c5d340fadb06106135b7fe9677fc6d275f3cd7f7e6f896316c4cfe6c022c/PyAutoGUI-0.9.37.tar.gz
Collecting pymsgbox (from pyautogui)
  Using cached https://files.pythonhosted.org/packages/b6/65/86379ede1db26c40e7972d7a41c69cdf12cc6a0f143749aabf67ab8a41a1/PyMsgBox-1.0.6.zip
Collecting PyTweening>=1.0.1 (from pyautogui)
  Using cached https://files.pythonhosted.org/packages/b9/f8/c32a58d6e4dff8aa5c27e907194d69f3b57e525c2e4af96f39c6e9c854d2/PyTweening-1.0.3.zip
Collecting Pillow (from pyautogui)
  Using cached https://files.pythonhosted.org/packages/d1/24/f53ff6b61b3d728b90934bddb4f03f8ab584a7f49299bf3bde56e2952612/Pillow-5.2.0-cp36-cp36m-manylinux1_x86_64.whl
Collecting pyscreeze (from pyautogui)
  Using cached https://files.pythonhosted.org/packages/c9/6e/e175fda37d76d7846a6cda8a4364dfd7c2d343139b0716c4f03194d14933/PyScreeze-0.1.17.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-6aakksn1/pyscreeze/setup.py", line 10, in <module>
        with open("README.md", "r") as fh:
    FileNotFoundError: [Errno 2] No such file or directory: 'README.md'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-6aakksn1/pyscreeze/

Can someone help me please?

2 Answers2

3

PyScreeze maintainer here. This is caused by a packaging error, which has been fixed in 0.1.18. It should work now if you install pyautogui, though you may have to delete the pip cache on your machine first.

Al Sweigart
  • 11,566
  • 10
  • 64
  • 92
1

The new release (v0.1.17) of pyscreeze fails to install as a dependency of pyautogui.

As a workaround try to install first the last working version of pyscreeze and after this pyautogui:

pip install pyscreeze<=0.1.14
pip install PyAutoGUI

I already created a new ticket for this issue https://github.com/asweigart/pyscreeze/issues/37

zerocewl
  • 11,401
  • 6
  • 27
  • 53
  • I've already tried this before, but I keep receiving the same message! –  Jul 19 '18 at 16:13
  • 1
    Check your installed version of pyscreeze with pip list or try to install both in a new and fresh virtualenv – zerocewl Jul 19 '18 at 16:15
  • pip list shows me 'PyScreeze (0.1.14)'. But I'm going to try a virtualenv, thanks –  Jul 19 '18 at 16:21
  • Hm ... U used pip3 in your question, maybe your default Python Version differs? – zerocewl Jul 19 '18 at 16:34
  • I think I managed to solve this problem installing PyautoGui version 0.9.17. Any posterior version doesn't work for me and returns the same error message. –  Jul 19 '18 at 16:34