Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've recently started using the Anaconda Python distribution for software development and I want it to be the default Python distribution when I run something in the terminal. In order to do this, I've added the Anaconda binaries directory to my .bashrc file:

export PATH="/opt/anaconda:$PATH"

This works fine.

However, now certain tools don't work in my Gnome desktop environment. I can't run gnome-tweak-tool and I can't open a terminal using a keyboard shortcut I assigned.

I've tracked down this problem to the fact that these operations now use my Anaconda installation and not the original, which has some extra libraries installed (e.g. `gi').

So how do I fix this problem? Is there any way to have things executed only at the start of a terminal session and not for my entire gnome environment?

share|improve this question

1 Answer 1

One way to do it would be to alias the python command to use anaconda rather than changing your path. Instead of changing your path, try adding:

alias python="/opt/anaconda"

to your .bashrc file. This should make it so anaconda will only be run when you type "python" into the terminal, not when something else tries to use it. (somebody correct me if I'm wrong, but this should work)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.