MacOS – Deleting a line from Bash profile

bashmacospathpythonterminal

So using terminal I typed in: nano .bash_profile
I then have access to the following bash_profile :

GNU nano 2.0.6 File: .bash_profile

# Setting PATH for Python 2.7
# The orginal version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}"
export PATH

# Setting PATH for Python 3.5
# The orginal version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.5/bin:${PATH}"
export PATH

# Added by Canopy installer on 2015-09-29
# VIRTUAL_ENV_DISABLE_PROMPT can be set to '' to make bashprompt show that Canopy is active, otherwise 1
VIRTUAL_ENV_DISABLE_PROMPT=1 source '/Users/psa1/Library/Enthought/Canopy_64bit/User/bin/activate'

# Setting PATH for Python 3.6
# The original version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.6/bin:${PATH}"
export PATH

I would like to completely delete the Canopy line from by bash profile since it is messing up pip or twilio downloads for instance. But I don't know how to do that!

Best Answer

Safer than deleting would be to add a # to the beginnng of any line you want disabled and commented out.

If you’re not sure about using the editor, the less you change, the better.

Then exit out of your terminal app and start it again to test.

Safest would be to make a new admin account just in case you need to log in with a working user.