sys.stderr.write("abort: couldn't find mercurial libraries in [%s]\n" % ' '
    .join(sys.path))
sys.stderr.write('(check your install and PYTHONPATH)\n')
sys.exit(-1)
How can I correct a corrupted $PYTHONPATH?