Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

mkvirtualenv --no-site-packages command getting "command not found" error

I have virtualenv and virtualenvwrapper installed, but when trying to setup an application, I enter mkvirtualenv --no-site-packages I get the following error:

-bash: mkvirtualenv: command not found

I am not sure how to troubleshoot this. As a beginner, I'd be grateful for any help.

like image 577
Jeff Severns Guntzel Avatar asked Mar 01 '12 17:03

Jeff Severns Guntzel


People also ask

How do I install Virtualenvwrapper on Windows?

To install, run one of the following: # using pip pip install virtualenvwrapper-win # using easy_install easy_install virtualenvwrapper-win # from source git clone git://github.com/davidmarble/virtualenvwrapper-win.git cd virtualenvwrapper-win python setup.py install # or pip install .

What is Mkvirtualenv?

it's a linux command which is used to create virtual env. mkvirtualenv foo creates a new virtual env at your home directory. You may switch to that env by running workon foo on your linux terminal.

Where is Virtualenvwrapper installed?

That installation installs virtualenvwrapper in the /usr/local/bin directory.


1 Answers

You need to enable virtualenvwrapper as described in its docs.

Shell Startup File

Add three lines to your shell startup file (.bashrc, .profile, etc.) to set the location where the virtual environments should live, the location of your development project directories, and the location of the script installed with this package:

export WORKON_HOME=$HOME/.virtualenvs 
export PROJECT_HOME=$HOME/Devel
source /usr/local/bin/virtualenvwrapper.sh

After editing it, reload the startup file (e.g., run source ~/.bashrc).

like image 92
wRAR Avatar answered Sep 19 '22 15:09

wRAR