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: https://automatetheboringstuff.com/chapter18/
unfortunately I keep failing setting up the needed module:
Command "python setup.py 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:
https://www.reddit.com/r/learnpython/related/3z5h0b/trouble_importing_pyautogui_os_x/
ps: i only downloaded the tar ball and used the setup.py inside
Answer
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/Xcode.app/Contents/Developer
Open command line and navigate to python3
directory:
/Library/Frameworks/Python.framework/Versions/3.5/bin
Run:
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:
python3
import pyautogui
If everything is fine you won't have an import error. I hope it helps.
Related Questions
- → What are the pluses/minuses of different ways to configure GPIOs on the Beaglebone Black?
- → Django, code inside <script> tag doesn't work in a template
- → React - Django webpack config with dynamic 'output'
- → GAE Python app - Does URL matter for SEO?
- → Put a Rendered Django Template in Json along with some other items
- → session disappears when request is sent from fetch
- → Python Shopify API output formatted datetime string in django template
- → Can't turn off Javascript using Selenium
- → WebDriver click() vs JavaScript click()
- → Shopify app: adding a new shipping address via webhook
- → Shopify + Python library: how to create new shipping address
- → shopify python api: how do add new assets to published theme?
- → Access 'HTTP_X_SHOPIFY_SHOP_API_CALL_LIMIT' with Python Shopify Module