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.

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).


This can actually vary a little bit depending on how you installed it. If you installed it on Ubuntu with apt, the virtualenvwrapper functions are actually rolled into a bash completion file (figuring that out was fun!).

export WORKON_HOME=$HOME/.virtualenvs 
export PROJECT_HOME=$HOME/Devel
possible_scripts='/usr/local/bin/virtualenvwrapper.sh /etc/bash_completion.d/virtualenvwrapper'
for script in $possible_scripts; do
  [[ -f $script ]] && source $script
done

Need Your Help

How to align title at center of ActionBar in default theme(Theme.Holo.Light)

android android-actionbar alignment center title

I searched a lot but can not find a way, How can I set then title at center of ActionBar instead of left aligned. I used below code to set the title at center :

ActionMailer and development mode, can it write to a file or something?

ruby-on-rails actionmailer

I want to test my registration process locally (development mode), how can I test how emails will be sent out and rendered etc?