First, let's check which versions of gcc are available in the repository: port list | grep gccĪt the time of this posting we have all versions ranging from gcc43 to gcc9. #Macports monterey install#Virtually every scientific software we will install from now on depends on these compilers. The fundamental packages we need to get are the GNU compilers gcc and gfortran. Once you finish installing MacPorts, go to the terminal and refresh its list of packages: sudo port selfupdate If you are familiar to unix, a good analogy is that MacPorts is similar to Ubuntu's aptitude or Suse's zypper. Now let's install MacPorts, which is a package manager for macOS. Installing XQuartz is a requirement to the next step. The way to go here is to install the latest XQuartz at. It will then download (about 150 Mb) and install all basic tools for development that we need. Once Xcode is downloaded and installed, install the command line tools by typing the following command on your terminal application: xcode-select -install Downloading it will take a while, so in the meantime I suggest you to go grab a beer or keep using your computer for something else that doesn't rely on the internet connection. Note: Xcode is currently (as of version 11.3) a massive - ~8 Gb - download. Just search for Xcode and install the first occurence returned. The easiest way to get Xcode is through your Mac's App Store. These applications distributed by Apple itself will provide the fundamental tools to develop software: Xcode installs the Apple C compilers and command line tools will provide automake, autoreconf, basic libraries and etc. Xcodeįirst of all, you will need to install the latest Xcode and command line tools. The following notes were tested and confirmed to work on macOS High Sierra (10.13), Mojave (10.14) and Catalina (10.15). #Macports monterey for mac#What follows is intended to be straightforward instructions for Mac owners to set up their computers to work with scientific programming (which often relies on Fortran and C compilers). I decided to write this post simply as a collection of notes that I used to put together my own system, and that hopefully could spare someone else to spend hours looking for them. This was essentially because all the information I needed was quite spread over many technical documents and forum discussions. As a scientist who works with computer models, it took me a long time to adapt switching from a Linux computer to a Mac computer.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |