Display "Canopy" on the command line

I have a basic term question. I just installed entopy Canopy for Python on Snow Leopard, and (Canopy 64bit) constantly appears when I work on the command line.

EX: (Canopy 64bit) Macbook ~ [username] $

I tried editing the bashrc file, but to no avail.

bashrc currently has the following:

# System-wide .bashrc file for interactive bash(1) shells.
if [ -z "$PS1" ]; then
   return
fi

PS1="Macbook~\u\$"
# Make bash check its window size after a process completes
shopt -s checkwinsize

-

Is there a way to stop "(Canopy 64bit)" from being displayed?

+5
source share
6 answers

He is in .bash_profile. But you will probably have to log out and come back in order for it to take effect as soon as you remove it.

Canopy python , . , .

+1

: Canopy , 0 GUI Canopy ; 1 "", Canopy ; , 2 - "" , , . , , Canopy, 1 0 reset.

virtualenv. virtualenv Python . , , , . virtualenv, Canopy : "" ( GUI).

, "" script, Canopy .bash_profile

~/Library/Enthought/Canopy_64bit/User/bin/activate

DJon.

virtualenv bash, , , "(Canopy 64bit)". , .bash_profile, , python .

punchagan virtualenv, Canopy :

VIRTUAL_ENV_DISABLE_PROMPT=true

+7

if 56--70

~/Library/Enthought/Canopy_64bit///

+1

bash, Canopy, ~/Library/Enthought/Canopy_64bit/User// . ( ):

#if [ -z "$VIRTUAL_ENV_DISABLE_PROMPT" ] ; then
#    _OLD_VIRTUAL_PS1="$PS1"
#    if [ "x(Canopy 64bit) " != x ] ; then
#   PS1="(Canopy 64bit) $PS1"
#    else
#    if [ "`basename \"$VIRTUAL_ENV\"`" = "__" ] ; then
#        # special case for Aspen magic directories
#        # see http://www.zetadev.com/software/aspen/
#        PS1="[`basename \`dirname \"$VIRTUAL_ENV\"\``] $PS1"
#    else
#        PS1="(`basename \"$VIRTUAL_ENV\"`)$PS1"
#    fi
#    fi
#    export PS1
#fi

bash . .

+1

~/Library/Enthought/Canopy_64bit/User/bin/activate.

      #PS1="(Canopz 64bit) $PS1"

    PS1="$PS1"

Canopy , , .

.

0

Editing the activation script works as Arkog replied, but if when I just commented out a line, I got something like:

- bash: / Users // Library / Enthought / Canopy_64bit / User / bin / activate: line 60: syntax error near unexpected else' -bash: /Users/<username>/Library/Enthought/Canopy_64bit/User/bin/activate: line 60:else token

Therefore, it was easier for me to simply replace this line:

$ PS1 = $ PS1

0
source

All Articles