What is the current best practice for setting up a development environment on OS X?

I recently got a new Mac with OS X 10.10, Yosemite.

I'm familiar with homebrew, and from my Linux experience, also with VirtualBox and using (headless) VMs. However, I know virtually (pun intended) nothing about Docker.

I'm a developer and have recently begun learning Node.js and Meteor. I have worked in the past mostly with Python on Linux machines. However, since 2013 I've had a self-imposed break from daily development while I've returned to school to earn a new degree.

A lot has changed since I left full-time development work in 2013 (I should have done a better job of staying on top of things). Now there's Docker, I'm hearing about Ansible for the first time, Homebrew is still around, no one seems to be using MacPorts anymore, and I feel completely lost with regard to figuring out the optimal way to setup my new machine for Node, Python, and C/C++ development.

My primary concern, aside from being free to play with and develop apps in Node, Python, and C/C++, is that my development environment must not interfere with my OS and daily computing life at all. For instance, when I got my first Mac back in 2009, I used homebrew to install Python and several packages, and at some point my system got somewhat screwed up with all the cruft I put on it.

I definitely want to avoid that. If that means using a VM or container (I'm not sure what the difference is, btw) to do all my development in, so be it, no matter how inconvenient it is. I'd rather keep my OS X system clean.

On the other hand, if there is a way to develop directly on my OS X machine, while keeping it clean and without allowing any software I install to interfere with my "normal" day-to-day apps and usage, that would be nice.

Can anyone offer any suggestions/advice? I have googled several variations of the query "os x development environment [language]" and have used search tools to filter out all but recent entries, but I haven't found an article on the subject yet that I am confident in.

  • 1
    According to Apple, any third party software that you install must be downloaded for the Apps Store or your system isn't "clean". If you do not mind soiling the OS a bit then I would suggest using an application that uses VM's (VirtualBox, etc..) . Where you can install your favorite Linux distro on a VM and go to down. This is from a guy that still uses MacPorts.
    – fd0
    Aug 2, 2015 at 23:21

3 Answers 3


There will be no correct answer to your question. Much relies on your preferences and development needs.

Developers working on Mac or iOS software are expected, by Apple, to do so without using a virtual machine.

If you are deploying to Linux or a non-Mac platform, a virtual machine is probably recommended.

To test your software on other versions of OS X, a virtual machine can be helpful.

Compiled Languages

To develop with C, C++, Objective-C, and Swift use Xcode. Xcode is Apple's own development tool and it will not harm your installation of OS X.

Scripts and Dynamic Languages

To develop with python or another scripting language, consider using a tool that allows installation of multiple versions of your language.

The aim is to install and use a version of your language that is isolated from the OS X provided binaries. Updates may change the OS X provided edition, but your environment will remain unchanged.

Homebrew and MacPorts

You should be able to use both homebrew and MacPorts without risk to your installation of OS X. Both package managers try to isolate their installations and both simplify removal of unwanted or troublesome software.

If you encounter problems, please log bugs with the developers.

As of 2015, both package managers are being actively developed:

  • As of November 2015, homebrew doctor still states that MacPort and Fink can cause trouble when installed at the same time as homebrew. In general, both package managers provide the same set of tools and software, so I'd recommend to stick to a single one.
    – Lætitia
    Nov 30, 2015 at 19:42

Another option which is now available on the App store is Veertu. I am using it and it works perfect. The free version enables me to run multiple isolated linux and windows Vms and also docker.

  • Yeah, that's nice. I've been using VirtualBox, but I'd prefer to use something approved by Apple, if it's similar in quality to VirtualBox. Apr 1, 2016 at 18:14

Use VirtualBox and Vagrant with a spot of post installation and you have a great isolated development environment.

I usually use the Red Hat family of Linux but for Concourse CI to work, I need to use Ubuntu.


  • Oracle VirtualBox
  • Vagrant installed


  1. open up a terminal shell on MAC
  2. create a directory called 2019_ubuntu/ and cd into it
  3. use this vagrant box https://app.vagrantup.com/bento/boxes/ubuntu-17.10
  4. $ vagrant init bento/ubuntu-17.10
  5. $ vagrant up
  6. $ vagrant ssh
  7. create a new user
  8. install docker-ce
  9. install docker-compose
  10. add docker group and add your user to that group
  11. additionally, add docker service to startup automatically on restart
  12. additionally, create a PS1 prompt for your shell ( if you created
  13. your user correctly then this may be omitted)
  14. check that docker is running OK with hello-world

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .