Install Python On Mac Catalina

Python
  1. If that’s the case, simply run this command instead and it will install pip. Sudo easyinstall pip. Python 2 vs Python 3. Python 2 is still on your system even though you’ve installed Python 3. In order to send commands to Python 3, you will need to enter python3 in the terminal. If you enter python, the command will be sent to Python 2.
  2. I’m imagining that you want to install Python 3.X, since Python 2.X comes preinstalled with Mac. The simplest way to install Python 3.X, simply head on to Welcome to Python.org, under the Downloads tab, click on the version starting with Python 3.
Download

Its easier then ever to get started with micropython developement on Mac OS X. This howto assumes that the user is starting from zero. Lets get started.

Mac OS X comes with Python 2.7. We will need Python 3 for our developement tools. Viisit python.org and download Python 3.7 64 bit for mac os x.

Once the download is complete open the package to install Python. Follow the instructions in the installer to complete the installation.

OS X doesn’t include a driver for the USB to serial chip used on the NodeMCU boards. Click the link below to download the driver.

Doing it Right¶. Let’s install a real version of Python. Before installing Python, you’ll need to install GCC. GCC can be obtained by downloading Xcode, the smaller Command Line Tools (must have an Apple account) or the even smaller OSX-GCC-Installer package.

Next, unzip the download. Open the folder and double click on the “.dmg” file. Run the installer and follow the instructions.

The first tool we’ll install is a command line tool for programming ESP8266 and ESP32 based boards. You can use this tool to write the micropython firmware to the ESP32.

To install esptool you’ll need to open the Terminal.app. Its located in the Applications -> Utilities folder. In terminal type the following:

Python

> pip3 install esptool

Our primary tool for micropython development will be uPyCraft. Click on the link below to down uPyCraft.

Install Python On Mac Catalina

Open the zip file and copy uPyCraft to the Applications folder.

Now visit the Micropython website and download the firmware for the ESP32. The link below will take you to the download page.

Mac

How To Install Python 3 On Mac Catalina

Liet’s write the firmware to the ESP32. We will do this using esptool. Open terminal.app. You will need to switch to the directory where you downloaded the bin file. For me its the Downloads folder. Be sure only one ESP32 is connected to your Mac. In terminal type the following:

> cd ~/Downloads
> esptool erase_flash
> esptool

write_flash 0x1000 esp32-idf3-20191220-v1.12.bin

Conclusion

That’s all there is to it. You now have everything you need to develop in micropython on the Mac.