Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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 am groping towards having a documented and ideal environment for me to develop in Python. I am going to utilize virtualenv to do so. I know that I can pass the python version as an argument to virtualenv.

What I don't understand is twofold:

1) Why do different versions of some programs (i.e., Python) get installed in different directories? For example, Python 3.3 is installed in /usr/lib/ while 2.7 is installed in usr/bin. Then of course there's the local versions too, but that's not an issue for me since I'm the sole user on my machine. It just seems like a mess and I've never found a satisfactory answer as to why it is this way.

2) If I am going to pass the version as an argument to virtualenv, I would like all of my Pythons to be in a consistent directory so I don't have to remember this stuff. I have read about how when installing from source one can pass an argument to configure to set the installation location, but I've also read that's a good way to really make a mess of things. I don't propose to do it as a habit, though; it's only for my Pythons. So wouldn't that limited use case be ok?

Thanks for any light that anyone can shed on this subject.

share|improve this question
OK, on further discovery, it seems that I don't have to give an absolute path to the Python version when using virtualenv. So #2 is effectively a non-issue. Still, my general rant remains :) – verbsintransit Jul 9 '13 at 20:00
Is this a question or a rant? Do you really mean your Python 3.3 interpreter is installed in /usr/lib? If so, someone botched the installation as /usr/lib isn't usually and shouldn't be in PATH. – msw Jul 9 '13 at 23:56
Which OS do you use? – Raphael Ahrens Jul 10 '13 at 3:45
I guess it is a rant: $ whereis python3.3 python3: /usr/lib/python3 /usr/local/bin/python3.3-config /usr/local/bin/python3.3m /usr/local/bin/python3.3m-config /usr/local/bin/python3.3 /usr/local/bin/python3 /usr/local/lib/python3.3 $ whereis python2.7 python2: /usr/bin/python2.7 /usr/bin/python2 /etc/python2.7 /usr/lib/python2.7 /usr/bin/X11/python2.7 /usr/bin/X11/python2 /usr/local/lib/python2.7 /usr/include/python2.7 /usr/share/man/man1/python2.1.gz I am running Ubuntu 12.04.02, btw. – verbsintransit Jul 10 '13 at 19:33

Your Answer


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

Browse other questions tagged or ask your own question.