I have a ipython config which imports lots of packages.

I also have some configs in my python setup like

  (setq python-shell-interpreter "ipython3"
        python-shell-interpreter-args "-i --profile=ipy --simple-prompt --pprint")

Loading a lot of packages will cause slow ipython shell startup. But this also happens when python-mode is being enabled.

Moreover, even after opened a python file, when I use C-c C-p to start an interactive shell, the slow progress happens again. Here is the illustration

enter image description here

After removing the --profile=ipy part, both the mode enabling and interactive shell starting will have a significant speed up.

enter image description here

I can understand the slowness of starting an interactive shell process when with --profile=ipy, but not the python mode enabling.

My question is what is the appropriate way to avoid this ? As I don't see any shell process when python mode is being enabled. The mode enabling is still very slow. Thanks!

  • Sorry for going off topic, but what theme are you using ? Commented Oct 22, 2016 at 4:15
  • @ChakravarthyRaghunandan It's spacemacs-light-theme, available in ELPA. Commented Oct 22, 2016 at 4:35

1 Answer 1


This is due to semantic-mode.

It will call python-shell-internal-send-string which depends on python-shell-interpreter and python-shell-interpreter-args.

Thus using a non-profile python-shell-interpreter-args to start this shell and set the profile one back after semantic-mode is enabled solves the problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.