2

Im new to Emacs, i hope i didn't miss anything simple.

My configuration is:

  • OS - OSX sierra 10.12.6.
  • Emacs - 25.3.1 (Emacs-emacs-plus from homebrew)
  • python - trying to set 2.7.14.

I want to make myself a decent developing environment for python, there is one problem i'm not sure how to solve.

I want emacs (and all layers) to use python from this path: /usr/local/bin/python2

I seted in .spacemacs file at (defun dotspacemacs/user-config ():

    ;; python:
    (setq python-shell-interpreter "/usr/local/bin/python2")
    (setq py-python-command "/usr/local/bin/python2")
    (setq python-shell-completion-native-enable nil)

Now when i execute run-python: python path run-pyton. it works well and start with desired version.

But when i'm editing python file in python-mode and trying to launch either live-py or python-execute-file it opens up in system default python version. i.e.: py-live mode. different path.

What i am doing wrong?

Thank

  • What's python-execute-file? I don't seem to have a command with that name (spacemacs branch devel). – Croad Langshan Nov 11 '17 at 22:12
1

SPC h d f run-python RET and SPC h d f live-py-mode will tell you that those two commands are provided by different files (python.el and live-py-mode.el respectively). This will take you to the source code for live-py-mode: SPC SPC find-library RET live-py-mode RET. If you look at the variables near the top of that file, you'll see that setting live-py-mode like this is what you need:

(setq live-py-version "python2")

  • trying SPC h d f live-py-mode RET i keep getting this message: simpler-helm-bookmark-keybindings: Symbol’s value as variable is void: helm-bookmark-map @Croad Langshan – NoamStolero Nov 14 '17 at 7:06
  • @MasterSprinkler Looks like you might need to update your spacemacs: github.com/syl20bnr/spacemacs/issues/9549 – Ryan Mar 12 '18 at 16:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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