Ask Your Question
1

Installing pyautogui on fedora getting this error

asked 2017-09-01 03:36:47 -0600

Khushal Sharma gravatar image

sudo pip3 install pyautogui WARNING: Running pip install with root privileges is generally not a good idea. Try pip3 install --user instead. Collecting pyautogui Using cached PyAutoGUI-0.9.36.tar.gz Complete output from command python setup.py egg_info: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/Xlib/xauth.py", line 43, in init raw = open(filename, 'rb').read() FileNotFoundError: [Errno 2] No such file or directory: '/root/.Xauthority'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/pip-build-_fcn3rgy/pyautogui/setup.py", line 6, in <module>
    version=__import__('pyautogui').__version__,
  File "/tmp/pip-build-_fcn3rgy/pyautogui/pyautogui/__init__.py", line 115, in <module>
    from . import _pyautogui_x11 as platformModule
  File "/tmp/pip-build-_fcn3rgy/pyautogui/pyautogui/_pyautogui_x11.py", line 160, in <module>
    _display = Display(os.environ['DISPLAY'])
  File "/usr/lib/python3.6/site-packages/Xlib/display.py", line 80, in __init__
    self.display = _BaseDisplay(display)
  File "/usr/lib/python3.6/site-packages/Xlib/display.py", line 62, in __init__
    display.Display.__init__(*(self, ) + args, **keys)
  File "/usr/lib/python3.6/site-packages/Xlib/protocol/display.py", line 61, in __init__
    name, host, displayno)
  File "/usr/lib/python3.6/site-packages/Xlib/support/connect.py", line 91, in get_auth
    return mod.get_auth(sock, dname, host, dno)
  File "/usr/lib/python3.6/site-packages/Xlib/support/unix_connect.py", line 103, in new_get_auth
    au = xauth.Xauthority()
  File "/usr/lib/python3.6/site-packages/Xlib/xauth.py", line 45, in __init__
    raise error.XauthError('~/.Xauthority: %s' % err)
Xlib.error.XauthError: ~/.Xauthority: [Errno 2] No such file or directory: '/root/.Xauthority'

----------------------------------------

Command "python setup.py egginfo" failed with error code 1 in /tmp/pip-build-fcn3rgy/pyautogui/

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-01-06 21:15:00 -0600

I had the same problem on puppy linux which is built on the packages from Ubuntu...anyways, here is the answer from the Ubuntu site which worked for me as well!

November 18th, 2017 #2 lijingeorge lijingeorge is offline First Cup of Ubuntu

Join Date Jun 2017 Beans 3

Re: Python pyautogui

Solved
I have to do the following to solve it
xhost +
touch ~/.Xauthority
pip install pyautogui
Then installation was successful
edit flag offensive delete link more

Question Tools

Stats

Asked: 2017-09-01 03:36:47 -0600

Seen: 472 times

Last updated: Sep 01 '17