I\'m using virtualenv-1.4.5 on Mac OS X 10.6.2 (Xcode is installed) and Python 2.6. Here\'s what I get when I attempt to run a virtualenv...
Mac-Pro:pylonsd
There's also a bug with virtualenv on 10.6 See the ticket on virtualenv's bitbucket. Even if you solve the problem you're having you'll still run into another problem (I think image not found for Python.framework, but I don't remember - I didn't take any notes when I ran into this)
I did some investigating into this and I hope the root of the problem with be resolved with Python 2.7 - certainly people know about it, and submitted a patch to CPython to fix it.
However, it does seem like some people have had good results with 10.6.2 and virtualenv 1.4.5... or not using the system Python anymore (macports, build-by-hand).
Install XCode from the App Store to fix the problem. I had the same error, installed XCode, ran it after installing, and now virtualenv works.
There is a solution for this using @gregglind's fork of virtualenv. I answered to the same problem here: mac osx: unable to use virtualenv
git clone https://github.com/gregglind/virtualenv.git
cd virtualenv
git checkout feature/install_name_tool
sudo python setup.py install
All you really need to do is install the Xcode "Command Line Tools", there is two ways to do it:
1.- If you already have Xcode installed, go to Preferences -> Downloads and select "Command Line Tools".
2.- Download the "Command Line Tools for Xcode" .dmg from: https://developer.apple.com/downloads.
You can install Xcode using the App Store, but it will not include the "Command Line Tools" by default.
I had the same error messages trying to run virtualenv on a up-to-date Max OSX Lion installation with XCode installed.
However: Mark hints on Mar 1 2010:
Well code says you have not installed Xcode but you say you have. What does which install_name_tool at the command line say? It should be install_name_tool -> install_name_tool == /usr/bin/install_name_tool
I had the same problem. I had installed the latest Xcode in Lion (10.7.2).
$ locate install_name_tool
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/install_name_tool
/Developer/usr/bin/install_name_tool
/Developer/usr/share/man/man1/install_name_tool.1
I made a simlink from the /Developer/usr/bin to the /usr/bin with
$ sudo ln -s /Developer/usr/bin/install_name_tool /usr/bin/install_name_tool
Entering the 'which' command yields:
$ which install_name_tool
/usr/bin/install_name_tool
After that I did the virtualenv magic
$ virtualenv -p python2.6 myvirtenv
Running virtualenv with interpreter /opt/local/bin/python2.6
New python executable in myvirtenv/bin/python
Installing setuptools............................done.
Installing pip...............done.
add install_name_tool to your path
export PATH=$PATH:/Developer/usr/bin