1

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!

8
  • 2
    Is that your actual .bash_profile? It appears to be missing the hash marks (#) to comment lines like "setting path" or "Added by Canopy". That said, Ctrl-K is what's used in nano to delete.
    – Allan
    Commented Mar 19, 2018 at 19:46
  • 1
    this is copy paste, if i add the hash it just ends up putting it in bold that's why I took them out Commented Mar 19, 2018 at 20:01
  • 1
    using ctrl-K just deletes it once, but if you restart terminal the bash_profile remains the same @Allan Commented Mar 19, 2018 at 20:05
  • 1
    I'm assuming you're saving it, right?
    – Allan
    Commented Mar 19, 2018 at 20:07
  • 1
    Yeah definitely ctrl-X and then relaunching terminal Commented Mar 19, 2018 at 20:24

1 Answer 1

1

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.

1
  • I ended up deleting the canopy line using vim and not nano.I used vim because for some reason the changes made on nano didn't appear when relaunching the terminal. but you're right should have added the hash Commented Mar 20, 2018 at 3:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .