/
Working with different versions of GCC or Python using MacPorts
Working with different versions of GCC or Python using MacPorts
- Browse to the MacPorts website.
- Download the DMG image for your operating system
- Open up a terminal Applications > Utilities > Terminal
Make sure that you have the latest version by running the self-update via the terminal command:
sudo port -v selfupdate
Install GCC or Python via the terminal command
sudo port install gcc5 sudo port install gcc6 sudo port install gcc12 sudo port install python311
First, identify which versions are installed on your system.
port select --list gcc port select --list python
To make the version of gcc or python the default (i.e. the version you get when you run python or gfortran), run:
sudo port select --set gcc gcc12 sudo port select --set python python311
, multiple selections available,
Related content
Installing, Upgrading, and Uninstalling Macports
Installing, Upgrading, and Uninstalling Macports
More like this
How to install multiple versions of Python using Anaconda
How to install multiple versions of Python using Anaconda
More like this
How to Install Homebrew
How to Install Homebrew
More like this
How To Install Antelope for MacOS and RHEL Users
How To Install Antelope for MacOS and RHEL Users
More like this