A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/proofit404/pyenv-mode below:

pythonic-emacs/pyenv-mode: Integrate pyenv with python-mode.

Pyenv mode integrates Fabián E. Gallina's python.el with the pyenv tool. This gives packages which already use python.el (like python-django) pyenv virtual environment support out-of-the-box.

You can simply install the package from Melpa:

M-x package-install RET pyenv-mode

Add following block to your Emacs configuration:

Now you can specify the pyenv Python version:

M-x pyenv-mode-set

So now when you run inferior Python with:

M-x run-python

The process will start inside the specified Python installation. You can unset the current version with:

M-x pyenv-mode-unset

When you set the Python version with pyenv-mode, the following changes happen automatically:

You can switch Python versions together with your current project. Drop the following lines into your Emacs init file. When you use projectile switch project with the C-c p p key binding pyenv-mode will activate the environment matched to the project's name.

(require 'pyenv-mode)

(defun projectile-pyenv-mode-set ()
  "Set pyenv version matching project name."
  (let ((project (projectile-project-name)))
    (if (member project (pyenv-mode-versions))
        (pyenv-mode-set project)
      (pyenv-mode-unset))))

(add-hook 'projectile-after-switch-project-hook 'projectile-pyenv-mode-set)

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4