Skip to content
This repository has been archived by the owner on Sep 9, 2024. It is now read-only.

Latest commit

 

History

History
25 lines (18 loc) · 1.05 KB

PYTHON2.md

File metadata and controls

25 lines (18 loc) · 1.05 KB

Python 2

Ionic uses node-sass, which is a deprecated library that uses an old version of node-gyp, which requires Python 2. For Node 14 on MacOS x86_64 there is a precompiled version, so you don't need to install Python 2, but if you have Apple Silicon, npm has to build this dependency for you.

You can download Python 2 from the official Python website but they do not have a version for Apple Silicon. MacPorts does have a version for Apple Silicon, Homebrew does not. Using Rosetta 2 may also work to run the x86_64 version.

Installation on MacOS using MacPorts

To install the version for your architecture on MacOS using MacPorts:

sudo port install python27
sudo port select --set python2 python27
sudo port select --set python python27

This makes two symlinks, /opt/local/bin/python2 and /opt/local/bin/python. If you don't want python to refer to Python 2, you can remove one or both symlinks when you've successfully built the app.