Installation folder of compiled programs



Hey there!

I just installed Python3.4.2 :) How I did it? Glad you ask ;)

Since I am running Crunchbang Eleven #! Waldorf for two days now I was not able to get it through the easy-cheesy software center like I used to in Ubuntu, so I installed all packages I needed to finally get Python3 installed. The 'required packages' differed on different pages, maybe because the tutorials were older...?! Anyway... I started with installing the following packages:

$ sudo apt-get install build-essential libncurses5-dev libncursesw5-dev libreadline6-dev libdb5.1-dev libgdbm-dev libsqlite3-dev libssl-dev libbz2-dev libexpat1-dev liblzma-dev zlib1g-dev
And I also followed the next step:

$ mkdir -p ~/.pip/cache
$ echo '[global]' > ~/.pip/pip.conf
$ echo 'download_cache = ~/.pip/cache' >> ~/.pip/pip.conf
Now I have a folder and a conf file more in my home space. Useless in my eyes. If anyone can explain this step to me, I appreciate it.

I further downloaded the latest Python (3.4.2) and followed the instructions (you gonna love this one):

./configure --prefix=/usr/local/opt/python-3.4.1
sudo make install
I hope you are smiling now ;) So what is the point of this post? I'll explain in a second...
During the installation of Python 3.4.2 I started to be curious where the installed 2.x might be stored so I catfished 'python' on /usr/*. The result: my pre-installed Python version was stored in /usr/lib/python2.6, /usr/lib/python2.7 - right next to the folder /usr/lib/python3 :eek:o_O

So... I definitely checked wether I had python3 installed in the first place (nope. Also the folder only contains one file) but what is it doing there? And is there any standardized folder structure? I mean, yeah I know, Linux is about choice but I am starting to think that most of these 'tutorials' just give a little hint about what Linux might be about.

I am a newbie here and I will probably mess up my system many times more, so I am cool with it but I appreciate if you answer my questions so it might happen one time less ;)

In the repos (over synaptic) I find packages until python3.2. Is it safer to install those instead of the latest versions?

How can I uninstall a programm I installed this way o_O?

Rarely felt so dumb like the last 30 minutes, honestly :confused:

edit: Last fun-fact: python3 gives no output in the terminal... :( divine comedy.


edit2: At least I think I found out how to uninstall: just delete the /usr/local/opt/python-3.4.1 folder?! Please confirm, I am insecure like a chicken right now x(
Last edited:


Kevin Milan

  • /usr/local for stuff which is "system-wide"—i.e. /usr/local tends to be in a distro's default $PATH, and follows a standard UNIX directory hierarchy with /usr/local/bin, /usr/local/lib, etc.

  • /opt for stuff you don't trust to make system-wide, with per-app prefixes—i.e. /opt/firefox-3.6.8, /opt/mono-2.6.7, and so on. Stuff in here requires more careful management, but is also less likely to break your system—and is easier to remove since you just delete the folder and it's gone.

Members online