Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

http://www.ficksworkshop.com/blog/14-coding/65-installing-gcc-on-mac
http://www.janosgyerik.com/working-with-different-versions-of-python-on-osx-using-macports/

  1. Browse to theĀ MacPorts website.
  2. Download the DMG image for your operating system
  3. Open up a terminalĀ Applications > Utilities > Terminal
  4. Make sure that you have the latest version by running the self-update via the terminal command:

    Code Block
    sudo port -v selfupdate


  5. Install GCC or Python via the terminal command

    Code Block
    sudo port install gcc5 
    sudo port install gcc6
    sudo port install gcc12 
    sudo port install python27
    sudo port install python311


  6. First, identify which versions are installed on your system.

    Code Block
    port select --list gcc
    port select --list python


  7. To make the version of gcc or python the default (i.e. the version you get when you run python or gfortran), run:

    Code Block
    sudo port select --set gcc gcc12
    sudo port select --set python python311




Info
http://www.janosgyerik.com/working-with-different-versions-of-python-on-osx-using-macports/