1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Setting python version for live-py and python-excecute-file (SPC m c c) in spacemacs

Discussion in 'Technology' started by Master Sprinkler, Oct 8, 2018.

  1. 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: [​IMG] 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.: [​IMG] different path.

    What i am doing wrong?

    Thank

    Login To add answer/comment
     

Share This Page