virtualenvwrapper not loading at login

116 views
Skip to first unread message

jc

unread,
Jul 28, 2011, 1:53:25 PM7/28/11
to virtualenvwrapper
I was able to successfully install virtualenvwrapper (v 2.7.1), using
these instructions, but then ran into some trouble:
http://jamiecurle.com/posts/installing-pip-virtualenv-and-virtualenvwrapper-on-os-x/

1. sudo pip install virtualenvwrapper

2. cd $HOME
mkdir .virtualenvs

3. vi .bash_login
edit and insert: source /usr/local/bin/virtualenvwrapper.sh

4. Close Terminal window; then open new Terminal window

5. Then type mkvirtualenv

Result: Command not found.

Have been googling around and trying out different things, but can't
figure out what's wrong.

Thanks in advance.

Doug Hellmann

unread,
Jul 28, 2011, 3:47:36 PM7/28/11
to virtualenvwrapper
First, I apologize for being so slow with the moderation on a support
question. It's a busy day, and I appreciate your patience.

On Jul 28, 1:53 pm, jc <jescar...@gmail.com> wrote:
> I was able to successfully install virtualenvwrapper (v 2.7.1), using
> these instructions, but then ran into some trouble:http://jamiecurle.com/posts/installing-pip-virtualenv-and-virtualenvw...
>
> 1.  sudo pip install virtualenvwrapper
>
> 2.  cd $HOME
> mkdir .virtualenvs
>
> 3. vi .bash_login
> edit and insert: source /usr/local/bin/virtualenvwrapper.sh
>
> 4. Close Terminal window; then open new Terminal window
>
> 5. Then type  mkvirtualenv
>
> Result: Command not found.
>
> Have been googling around and trying out different things, but can't
> figure out what's wrong.

Depending on how your terminal starts bash, it may not run
the .bash_login script. The best advice I can give is to take a look
at the man page for bash to see the algorithm it uses to decide which
startup scripts to load, and then compare that with the options your
terminal program is passing when the shell is started. If it isn't
running as a "login" session, you may need to put the instructions
in .bashrc or .bash_profile. For example, under OS X I have iTerm set
to pass the -l (lowercase L) option to bash to create a "login"
session and run my .bash_profile.

Hope that helps,
Doug

Carl Karsten

unread,
Jul 28, 2011, 9:06:56 PM7/28/11
to virtuale...@googlegroups.com
On Thu, Jul 28, 2011 at 2:47 PM, Doug Hellmann <doug.h...@gmail.com> wrote:
> First, I apologize for being so slow with the moderation on a support
> question. It's a busy day, and I appreciate your patience.
>
> On Jul 28, 1:53 pm, jc <jescar...@gmail.com> wrote:
>> I was able to successfully install virtualenvwrapper (v 2.7.1), using
>> these instructions, but then ran into some trouble:http://jamiecurle.com/posts/installing-pip-virtualenv-and-virtualenvw...
>>
>> 1.  sudo pip install virtualenvwrapper
>>
>> 2.  cd $HOME
>> mkdir .virtualenvs
>>
>> 3. vi .bash_login
>> edit and insert: source /usr/local/bin/virtualenvwrapper.sh

did .bash_login even exist? (I normally use .bashrc and reciently a
box didn't have it, and (no surprise) didn't run it when I created
it.)

Throw a echo hi! in there to see if that runs.

>>
>> 4. Close Terminal window; then open new Terminal window
>>
>> 5. Then type  mkvirtualenv
>>
>> Result: Command not found.
>>
>> Have been googling around and trying out different things, but can't
>> figure out what's wrong.
>
> Depending on how your terminal starts bash, it may not run
> the .bash_login script. The best advice I can give is to take a look
> at the man page for bash to see the algorithm it uses to decide which
> startup scripts to load, and then compare that with the options your
> terminal program is passing when the shell is started. If it isn't
> running as a "login" session, you may need to put the instructions
> in .bashrc or .bash_profile. For example, under OS X I have iTerm set
> to pass the -l (lowercase L) option to bash to create a "login"
> session and run my .bash_profile.
>
> Hope that helps,
> Doug
>

--
Carl K

Reply all
Reply to author
Forward
0 new messages