Skip to content

Instantly share code, notes, and snippets.

@caseyanderson
Last active January 19, 2020 22:17
Show Gist options
  • Save caseyanderson/0c1f508acaac2f2afd77966af44f7dee to your computer and use it in GitHub Desktop.
Save caseyanderson/0c1f508acaac2f2afd77966af44f7dee to your computer and use it in GitHub Desktop.
describes the installation procedure for MicroPython development under MacOS

Micropython Pre-flight (MacOS)

by Casey Anderson

Reference

Materials

Xcode / The Command Line Tools

  1. Do you have Xcode? To check go to the terminal and execute xcode-select -p

    • If /Applications/Xcode.app/Contents/Developer (or something similar) appears as a response proceed to the next step
    • If anything else happens download and install Xcode from here before moving on
  2. Enter xcode-select --install into the terminal, which should result in something like this:

    xcode-select_install_cmnd_line_tools
  3. Click Install to download and install the Xcode Command Line Tools.

Homebrew

  1. Copy and paste this code into the terminal and press enter to install homebrew: /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

  2. If prompted, agree to the Xcode license by executing sudo xcodebuild -license in the terminal

    agree_to_xcode_license
  3. Search to see if something is available on homebrew with search: brew search python3

Python3

  1. Install Python3 via Homebrew: brew install python3

PyPI

PyPi is frequently referred to as pip. It is used to manage Python library installations and ships with Python3 when installed via Homebrew. The command to use it is pip3.

  1. Make sure pip3 is up to date: pip3 install --upgrade pip
  2. Search for something on pip3 with search: pip3 search jupyter

Jupyter

  1. Install Jupyter via pip3: pip3 install jupyter
  2. Start the Jupyter Notebook IDE: jupyter notebook jupyterhome
  3. On the Jupyter homepage click New and select Python3. This will create and open an iPython Notebook file. pyjupyternotebook
  4. Click File, select Save As and name the file
  5. Click File and select Close and Halt to exit
  6. On the Jupyter homepage check to make sure the iPython Notebook file (.ipynb) that you just saved exists jupyteripynb
@caseyanderson
Copy link
Author

xcode-select_install_cmnd_line_tools

@caseyanderson
Copy link
Author

agree_to_xcode_license

@caseyanderson
Copy link
Author

jupyterhome

@caseyanderson
Copy link
Author

pyjupyternotebook

@caseyanderson
Copy link
Author

jupyteripynb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment