Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pyautogui doesn't seem to work on macOS Mojave #247

Closed
chaityacshah opened this issue Jul 21, 2018 · 14 comments

Comments

@chaityacshah
Copy link

commented Jul 21, 2018

I recently updated to macOS Mojave (10.14 Beta). Commands like pyautogui.moveTo(1027,73), pyautogui.click(1027,73), etc. don't seem to work at all. Neither any error messages are thrown nor do the method calls work. pyautogui worked perfectly on macOS High Sierra.

@Shark4109

This comment has been minimized.

Copy link

commented Oct 9, 2018

I have exactly the same issue, no errors whatsoever, Also tried with different python libraries and mouse move doesn't seem to work on macOS Mojave. Mouse location does work tho. I also managed to move mouse with Cocoa, so I guess event names or something must have been changed. As I looked a bit, there might be some issues with pyobjc not being fully optimized for macOS Mojave.

@cyril94440

This comment has been minimized.

Copy link

commented Oct 12, 2018

Same issue here !

@Shark4109

This comment has been minimized.

Copy link

commented Oct 12, 2018

I managed to solve the mouse moving with Quartz library (which pyautogui uses), but doing clicks seems to be much harder.

@joshua-robinson

This comment has been minimized.

Copy link

commented Oct 27, 2018

Any news on fixing this? I'm having the same issue on Mojave.

@DimitriosLisenko

This comment has been minimized.

Copy link

commented Nov 11, 2018

Not a pyautogui user, but on Mojave, there's a new security feature where you must explicitly allow applications to use your mouse/keyboard. Have a look in Security Preferences > Security & Privacy > Privacy > Accessibility - you might have to allow your terminal application in the list.

@Shark4109

This comment has been minimized.

Copy link

commented Nov 11, 2018

@DimitriosLisenko You are right! This actually worked, personally I'm using iTerm so I had to add it in Accessibility as you described!

@chaityacshah

This comment has been minimized.

Copy link
Author

commented Dec 22, 2018

@DimitriosLisenko - Thank You! This fixed the issue so closing it.

@tros897

This comment has been minimized.

Copy link

commented Feb 18, 2019

@DimitriosLisenko I have allowed my application in the list, but it does not work for me.

@Shark4109

This comment has been minimized.

Copy link

commented Feb 18, 2019

@tros897 With what application you are running python script? I was using iTerm2, so I had to add this to application list, make sure you add the correct application.

@tros897

This comment has been minimized.

Copy link

commented Feb 18, 2019

@Shark4109 I try to learn how to build a python bot to play a simple game, and I'm running python script in Pycharm. I add Pycharm to application list, but it's not working.

@jzxyryz

This comment has been minimized.

Copy link

commented Mar 7, 2019

@Shark4109 I try to learn how to build a python bot to play a simple game, and I'm running python script in Pycharm. I add Pycharm to application list, but it's not working.

Try to add Python Launcher (/Applications/Python 3.7/) in that app list.

@SarthakDandriyal

This comment has been minimized.

Copy link

commented Mar 11, 2019

Is there any alternate library which we can use on mac ?

@Nv7-GitHub

This comment has been minimized.

Copy link

commented Jul 8, 2019

Thank you, the python launcher needed to be added

@tajalagawani

This comment has been minimized.

Copy link

commented Aug 6, 2019

Any news on fixing this? I'm having the same issue on Mojave.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
10 participants
You can’t perform that action at this time.