Tuesday, October 25, 2011

Installing pip and virtualenv on OS X

Download and install the appropriate easy_install egg.
sudo sh setuptools-0.6c11-py2.X.egg
and from then on it is the same as for linux
sudo easy_install pip
sudo pip install virtualenv
Create a virtualenv instance:
virtualenv ENV
and you'll get something like:
Could not call install_name_tool -- you must have Apple's development tools installed
So you need to go off and install XCode, which will probably take a while (4.2 is 1.7 G).

Once you have Xcode, things should be good:
$ virtualenv ENV
New python executable in ENV/bin/python
Installing setuptools............done.
Installing pip...............done.
$ source ENV/bin/activate

No comments: