asweigart / pyautogui

A cross-platform GUI automation Python module for human beings. Used to programmatically control the mouse & keyboard.
BSD 3-Clause "New" or "Revised" License
10.45k stars 1.26k forks source link

pyautogui unusable in Python 3.9.7 on macOS 12.0.1 due to segmentation fault #639

Open aprknight opened 3 years ago

aprknight commented 3 years ago

I maintain my Python environment with Homebrew (may be relevant).

I have an apparently successful installation of pyautogui - i.e., after 'pip install pyautogui' I see 'Successfully installed pyautogui-0.9.53'.

During:

import pyautogui

SIGSEGV is raised and Python crashes

nashaad commented 2 years ago

Same here, Segmentation Fault: 11 Python 3.10.2 MacOS 10.13.6 (17G14033)

xiecang commented 2 years ago

Same here, Segmentation Fault Python 3.9.5 MacOS 12.1 (21C52)

aprknight commented 2 years ago

I have eliminated Homebrew as potentially affecting the installation. I have a Python 3.10.2 virtual environment and the segmentation fault still occurs. macOS is now 12.1. Disappointed that this is still an issue 3 months after first reporting it

lesurJ commented 2 years ago

same here also, importing pyautogui raises a SEGFAULT running python3 3.8.5 on macOS 10.13.6

bandoche commented 2 years ago

Finally crashed on

Quartz/CoreGraphics/init.py

from Quartz.CoreGraphics._inlines import _inline_list_
kmjbyrne commented 2 years ago

I encountered this issue also with the 2 following configurations using this as a simple test bed:

import 
print(pyautogui.position())

Python 3.8.5 MacOS 12.6

$ python3 main.py                                                                                             
[2]    59669 segmentation fault  python3 main.py

Python 3.10 MacOS 12.6

$ python3 main.py                                                                                             
segmentation fault  python3 main.py

The only remedy I found was to execute the script with sudo.

$ sudo python3 main.py                                                                                    
Point(x=807, y=469)
huitingloke commented 1 year ago

same here, segmentation fault even after trying the previous solution to sudo it

Python 3.12.0a7 pip 23.3 from python 3.12 MacOS 13.3.1