StackStrap is a command line tool written in Python. It will install on any Mac OS X or Linux computer. Windows usage is definitely possible but has not been documented yet.
Since StackStrap uses Vagrant for the management of the virtual machine images that will be used for development you will need to have Vagrant installed on your workstation. See the Vagrant Installation Documentation for instructions.
It’s very easy to install StackStrap as it’s a standard Python package that’s available on the cheeseshop.
The documentation will install it globally using easy_install but you can certainly install it using pip to a virtualenv if you desire.
To install StackStrap we’re going to be using the easy_install command as root so that StackStrap will be globally available.
Open up a terminal and run the following command:
sudo easy_install stackstrap
This will install StackStrap and all of it’s dependencies. It will place a command named stackstrap in your $PATH so that you can use it from any where on your system.
The better way - pip¶
The Easy Installation method is a very fast way to get up and running with StackStrap, but using easy_install is not the best way to install and manage packages on your system. You should be using pip to do this. For background on why check out this Stack Overflow question: Why use pip over easy_install?
However, unlike easy_install you must first install pip before it can be used.
Mac OS X¶
On OS X you first need to have the developer command line tools installed. Then you need to decide between between two different package managers.
Homebrew is a newer package manager that integrates into your base OS X system libraries and allows for quick & easy installation of packages into a specific directory, named Cellar, so that it can easily be removed if necessary.
To get running with Homebrew:
- Install Homebrew
- brew install python
- pip install stackstrap
Mac Ports is package manager that has been around for a longer time and does not integrate with the base OS X system libraries (the FAQ explains why). It allows for easy installation and use of multiple Python versions (ie. 2.6, 2.7, 3.2 & 3.3).
To get running with Mac Ports and Python 2.7:
- Install Mac Ports
- sudo port selfupdate
- sudo port install py27-pip
- sudo port select --set pip pip27
- sudo pip install stackstrap
IMHO This section contains the opinions of the developers of StackStrap. These are not the only two methods of installing pip on OS X. You can also install pip directly to the base OS X system or use Fink. (Plus probably some others)
If you’re on a Linux system your package manage will most likely have a package for pip ready for you to use.
On Debian based systems:
sudo apt-get install python-pip
On RedHat based systems with yum:
sudo yum install python-pip