Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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

You must log in to answer this question.

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