Here's the situation: you're in the process of building python from source and you're out of space on /tmp.
Looking at the output from df -h /tmp it tells us that /tmp is actually part of / rather than being a tmpfs or other separate mount. So the real issue is that your root filesystem is out of space.
You can try removing files from /tmp but unless you have a vast amount in there it's unlikely to make a significant difference. Here's a snippet to identify and remove files that are more than two days old and to remove any empty directories; append -delete to action the deletion when you are comfortable with the set of files it's identified:
sudo find /tmp -type f -mtime +2 -print # Append "-delete" to action the deletion sudo find /tmp -mindepth 1 -type d # Append "-delete" and then expect "Directory not empty" errors Do you have more space on /dev/sda that you can reallocate to /dev/sda3? Or perhaps you can split off /home if you haven't done so already. Or you could try redefining $TMPDIR to point to a directory on a different filesystem. Without knowing your filesystem layout these can only be suggestions. If you're running a virtual machine perhaps you can increase the disk size and grow /dev/sda3 and its / to match.