I recently upgraded to (K)ubuntu 16.04 which includes Emacs 24.5.1. Since the upgrade, Emacs stalls for more than three minutes when opening any Python file. The problem occurs when opening a new Python file as well as on existing files. I tried eg.
emacs --no-init-file example.py
where the file can be a literal hello world program, non existing or any small Python script. The problem also occurs when opening a Python file after editing other files or when using dired to open the file. I left no extensions installed on that system.
CPU load and memory footprint are normal while Emacs stalls (below 1% on my system). Ctrl+G allows circumventing the problem. Once the first Python file has loaded, all other Python files load normally w/out delay.
I tried removing all configuration files
rm -r .emacs*
but that did not help either (note that I could not reproduce the problem on other (K)Ubuntu systems). The only message I get from Emacs is likely not related: "Warning: no abbrev-file found, customize `abbrev-file-name' in order to make mode-specific abbrevs work.". How can I get Emacs to be usable for editing Python files again? Any hints are welcome. Thanks.
emacs -Q example.py? Note that the
-Qoption is different than
debug-on-quitcan get a backtrace from hitting Ctrl+G which is usually helpful for solving.