Configuring macOS Sonoma for Software Engineering

Over the years I’ve tracked how to properly configure a MacBook Pro for software development. Here I am with a new machine and I will document configuring macOS Sonoma for software engineering. As with my prior posts I’ll keep this up to date with enhancements and changes over time. I’m primarily doing this so that I remember what the heck I did. It is a bonus if anyone else can benefit from this.

What’s the Machine we will be Working With?

Well for the first time ever, I opted for weight, or lack of weight, over ultimate power. I think that’s a reflection of two things. First, I am not doing a lot of complier type development anymore. I’m doing a lot of python, doing it locally, and experimentally so I really don’t require containers or VMs that need lots of RAM.

This machine will also be only for personal work. My employer is locking down their machine. That’s fine – probably a good idea, but it is time to get a modern machine for my own work. The machine I opted for is a 15″ MacBook Air 2023 with the M2 Apple chip, 16GB RAM, and a 500GB SSD. Now that 500GB limit is a concern, but its just something I’ll have to manage.

I will not do a direct transfer from my old machine. Too much junk and I want a clean config.

Whoa – Don’t get too Excited this Time!

Trying to learn from Big Sur and my previous machine…don’t start installing stuff immediately. Its a good idea to first see what is actually on this machine before we start installing stuff. A critical question: what version(s) of Python is installed? Since I’m doing mostly Python, pre-installed stuff can create havoc. After running a couple of “which python” and “which python3” commands I saw that Python2 is not installed – yay! Python3 is installed – boo!

My machine is free of Java. That’s good! My machine is not free of Ruby and it is Ruby 2.6. Boooo!

First Steps for Configuring macOS Sonoma

So where to start? XCode! Get that installed along with the command line tools. Grab coffee or beer because it will take a while. While waiting I installed a desktop client for my choice in cloud storage providers (Dropbox) so that I can move very specific things from one machine to the other.

Next basic step is to install Homebrew. I’ll try to install as much as sensible, especially developer tools, using Homebrew. Next steps:

  • Grab desktop installers for, JetBrains IntelliJ Community, and VSCode.
  • I installed those after XCode finished installing.
  • Install the command line tools and I am now ready to go!
  • Confirm that in a terminal with “git –version”.
  • Anything else –> brew it!

Configuring Python on macOS

Once you have brew installed this is a no brainer:

brew install python

Then re-open your terminal window. Check “which python3” to make sure you have the brew installed python active.

Then use brew to install pipenv:

brew install pipenv  

I prefer to use pipenv to manage python virtual environments. There are a bunch of options, but this one seems to be the best in terms of simplicity and ease of integration with IDEs like VSC and IntelliJ. After running that command, check to make sure pipenv is active with “pipenv –version” from the terminal command line.

If that works you can now create new python virtual environments with commands like:

mkdir my_python_project
cd my_python_project
pipenv install

and it will blow out a project in that directory with a complete python virtual environment stored under your home directory. The python environment will be stored under your home directory. Easy to enter (pipenv shell) and exit (exit) – check the command line for instructions.

VSCode is super powerful, but getting Python to work can sometimes be problematic with this configuration. When you open a workspace you need to select the correct Python environment. For .py file you need to select the correct runtime for your pipenv here:

Setting the runtime

For Jupyter notebooks you also need to select the correct kernel here:

Setting the kernel

If these are not both set you will have issues with the pylance configuration not working. I find also that sometimes restarting VSCode after adding packages is necessary.

Installing the Rest of the Toolbox

I installed the rest of the tools with GUI installers: VSCode, Android Studio, VLC, Slack, Sonos, Skype, MS Office, Jetbrains IntelliJ Community, Nikon NXStudio, Kindle,, Firefox Developer, Espon Scanner 2, and Mozilla Thunderbird. That should pretty much do it for the major tools I need. The machine is wicked fast for sure. Some of these installers are quite large and they finish very fast.

Most of these packages installed easily. Thunderbird is tricky until you know the trick. Look in your old machine under Libraries in your home directory until you find the Thunderbird folder. Copy that and transfer it to the new machine. Install Thunderbird and then quit it. Copy that Thunderbird folder to your new library replacing the folder that just was put there. Start Thunderbird back up and boom! This should bring over everything: email, settings, local folders, and address book. Makes me wonder if you could manage this whole folder as a github repo and then clone it to multiple machines to get email where ever you are…not today 🙂

Conclusions on macOS Sonoma and the MacBook Air

As with previous posts, this will be updated over time to include more software engineering tools and basic productivity tools too. I have to say that – I do like this new MacBook Air – I wasn’t sure I would but it seems to be great so far and its super lightweight. Battery life is fantastic. Performance is – well amazing. The quality of the screen and even the audio is what you would expect from Apple. Finally, it is so nice to hit the “h” key and get just one “h”. Such a relief.

Leave a Reply