MacPorts installs versions with the virtualenv version in /opt/local/bin , the default location for MacPorts. When using MacPorts, you need to make sure that /opt/local/bin is in the shell PATH environment variable. Here I show that both py26-virtualenv and py27-virtualenv :
$ echo $PATH /opt/local/Library/Frameworks/Python.framework/Versions/Current/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/Developer/Tools $ ls -l /opt/local/bin/virtuale* lrwxr-x--- 1 root admin 13 Oct 15 2009 /opt/local/bin/ virtualenv@ -> virtualenv2.6 lrwxr-xr-x 1 root wheel 74 May 17 02:20 /opt/local/bin/ virtualenv-2.6@ -> /opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin/virtualenv lrwxr-xr-x 1 root wheel 74 May 17 02:29 /opt/local/bin/ virtualenv-2.7@ -> /opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/virtualenv lrwxr-xr-x 1 root wheel 88 Jun 27 2010 /opt/local/bin/ virtualenvwrapper_bashrc-2.6@ -> /opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin/virtualenvw
In general, if you want to know what files the MacPort port installs, and where, port contents you can find out:
$ port contents py27-virtualenv Port py27-virtualenv contains: /opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/virtualenv /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/virtualenv-1.6.1-py2.7.egg-info/PKG-INFO /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/virtualenv-1.6.1-py2.7.egg-info/SOURCES.txt /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/virtualenv-1.6.1-py2.7.egg-info/dependency_links.txt /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/virtualenv-1.6.1-py2.7.egg-info/entry_points.txt /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/virtualenv-1.6.1-py2.7.egg-info/not-zip-safe /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/virtualenv-1.6.1-py2.7.egg-info/top_level.txt /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/virtualenv.py /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/virtualenv.pyc /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/virtualenv_support/__init__.py /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/virtualenv_support/__init__.pyc /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/virtualenv_support/distribute-0.6.16.tar.gz /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/virtualenv_support/pip-1.0.1.tar.gz /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/virtualenv_support/setuptools-0.6c11-py2.7.egg /opt/local/bin/virtualenv-2.7 /opt/local/share/doc/py27-virtualenv/index.txt /opt/local/share/doc/py27-virtualenv/news.txt
source share