Take a minute to look at what you're trying to achieve: you want to import the
module abc.py which is a part of the package lib, so in order to import it correctly you need to specify in which package it is:
from lib import abc
or
import lib.abc as my_import
On a side note, have a look at the Python Tutorial chapter on modules.
Given what @Noelkd commented, I forgot to tell you about PYTHONPATH which is an environment variable that contains the folder where Python will look for the module (like the Java CLASSPATH). You need to put your root folder inside the PYTHONPATH to avoid doing some fiddling with sys.path.append.
In Bash:
export PYTHONPATH=<abs. path to outdir>
For example, I've put outdir in my Desktop:
export PYTHONPATH=~/Desktop/outdir
And the import works like a charm.
You can find some great explanations of the import mechanism and PYTHONPATH in this blog post.
N.B.: If you're using an IDE (PyDev for example), generally it will set up the PYTHONPATH automatically for each project. But if you want to do it all by yourself, you will need to set the PYTHONPATH environment variable.