Phyton3 Pip And Pyautogui Install Mac -remove Broken Python

having jumped into java development a year ago, i now struggle myself thru terminal commands and try to get the red line in it.

I now want to set up python3 and pyautogui following this tutorial:

unfortunately I keep failing setting up the needed module:

Command "python egg_info" failed with error code 1 in /private/tmp/pip-build-ct_f0rph/pyobjc-core

if you please could help me out removing old python installations, and linking python command to python3 i´d be very happy :)

thanks a lot!

EDIT: my problem was due to missing xcode, installing it and agreeing license made it work with below answer

still had a problem after installing pip, here is the solve for all who still get problems:

download recommended file and run the setup inside, had to punch in many commands to run it from appropiate directory but it finally works when importing pyautogui:

ps: i only downloaded the tar ball and used the inside



Download proper installer of python 3: Python3

Install Xcode (get it from Xcode) if you don't have it yet.

Point xcode-select to the Xcode Developer directory using the following command:

sudo xcode-select -s /Applications/

Open command line and navigate to python3 directory:



sudo pip3 install pyobjc-framework-Quartz
sudo pip3 install pyobjc-core
sudo pip3 install pyobjc
pip3 install pyautogui

Try your installation from the command line, type:

import pyautogui

If everything is fine you won't have an import error. I hope it helps.