Question

I have been following instructions that I found online to try to use virtualenv

My steps were:

  1. sudo easy_install pip - I'm doing this in my home directory

  2. sudo pip install virtualenv - I think virtualenv is installed at this point because when I try again, it says Requirement already satisfied

  3. The instructions then tell me to cd to my desktop and type in virtualenv env yet the output is as follows "-bash: virtualenv: command not found"

Does it mean that the shell can't find the command virtualenv? I thought I installed it.

Was it helpful?

Solution

$PATH should contains directory where virtualenv installed. your pip might install into /usr/local/bin (or other pip's default directory).

you can add some pathes in ~/.bashrc or ~/.profile~ files.

$ cat ~/.profile
export PATH=$PATH:/usr/local/bin

if you can't find virtualenv in /usr/local/bin, then you might want to change pip install directory with -d option.

$ pip install -d your_path virtualenv
...
$ your_path/virtualenv

if PATH include your_path, simply use

$ virtualenv

And this question & answer can help you.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top