Try: hg purge --all python-dbg setup.py build_ext --inplace Also make sure that gdb is configured with python2; on new Debian-based distributions, gdb comes configured with python3, whereas cygdb relies on a gdb configured with python2. Alex