Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

virtualenv command not found after installed with MacPorts

I have python 2.7 installed via mac ports on a mac. I installed virtualenv via macports (py27-virtualenv @1.6.1_0 (active). When issue the command: virtualenv demo_venv --no-site-packages, I get this error: -bash: virtualenv:command not found. It's not picking virtualenv up @ all, so do I need to symlink it to my python27 location?

like image 489
demet8 Avatar asked Jul 08 '11 02:07

demet8


1 Answers

As you noted, MacPorts offers several versions of pyXX-virtualenv packages. You need to tell MacPorts which of those versions you want to use by default:

port select --list virtualenv
port select --set virtualenv virtualenv27
which virtualenv

After this, you should be able to just type virtualenv (assuming the MacPorts bin directory is in your path).

like image 177
Jamie B Avatar answered Oct 11 '22 13:10

Jamie B