How best to isolate my development environment on OS X?
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.


For python investigate virtualenv; see Multiple Python Versions on OSX with Virtualenv and Homebrew;
For perl this would be perlbrew. 


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:


You can follow homebrew's development on Github;
You can see recent changes to MacPorts in their timeline.