9 votes
Accepted

How to customize the line character length in elpy?

If you want to customize per project basis, you can create a setup.cfg with custom config like this [flake8] max-line-length = 160 If you want to change this globally, you can change flake8 config as ...
Chillar Anand's user avatar
9 votes
Accepted

flymake : How can I modify/ignore syntax and styling rules?

flymake uses flake8 to check the errors, so you have to tell flake8 which errors you don't want to see. You can do that globally by creating the file ~/.config/flake8, with the following content: [...
Jesse's user avatar
  • 1,994
8 votes

How to set up elpy to use python3?

You can solve this by modifying the python shell configuration from python to python3 in elpy-config M-x elpy-config to enter the configuration page of elpy if you scroll down you will see groups ...
oksuzgonul's user avatar
6 votes

Ipython completion in elpy

I don't use eply, I use emacs 25.1.1 with company-jedi with the following: (setq python-shell-interpreter "ipython3" python-shell-interpreter-args "--simple-prompt --pprint") Inside emacs *Python* ...
eflanigan00's user avatar
6 votes

How can I defer loading elpy using use-package?

The author of elpy suggests doing this via an advice, because elpy-enable modifies the python-mode-hook variable, so calling it inside the mode-hook is too late: https://github.com/jorgenschaefer/elpy/...
T Nierath's user avatar
  • 161
5 votes
Accepted

Function to restart python console

Well I figured it out: kill-process kills the process as a side effect, so it returns before that is really killed. So a function like this works: (defun my-restart-python-console () "Restart ...
atevm's user avatar
  • 948
5 votes
Accepted

how to set ipython on a virtualenv?

Reading the docstring for the deprecated elpy-use-ipython, it points to https://elpy.readthedocs.io/en/latest/ide.html#interpreter-setup that recommends the following setup for ipython: (setq python-...
Heikki's user avatar
  • 3,066
5 votes

Elpy doesn't recognize I have virtualenv installed

(setq elpy-rpc-virtualenv-path 'current) works for me.
aadcg's user avatar
  • 1,248
5 votes

Annoying "error in process filter: Overlapping strings detected"

There's a workaround suggested in https://github.com/jorgenschaefer/elpy/issues/1381#issuecomment-434313600 Adding (setq elpy-eldoc-show-current-function nil) to my emacs init file makes it stop ...
Paul Coccoli's user avatar
5 votes
Accepted

py-autopep8-enable-on-save is deprecated! use [py-autopep8-mode] instead!

If using elpy then updating your .emacs file fixes this. ;; old line (this throws the warning) (add-hook 'elpy-mode-hook 'py-autopep8-enable-on-save) ;; updated line (add-hook 'elpy-mode-hook 'py-...
tnknepp's user avatar
  • 270
4 votes

Function to restart python console

If you're using ipython, why not just use the baked-in %reset magic command? You can also use: %load_ext autoreload %autoreload To automatically reload imported modules on change.
Gastove's user avatar
  • 1,551
4 votes
Accepted

How to start python shell in appropriate working directory?

This should be fixed as of the docs By default, Elpy tries to find the root directory of the current project (git, svn or hg repository, python package or projectile project) and starts the python ...
serv-inc's user avatar
  • 818
4 votes
Accepted

Elpy Dependecies in Virtual Env

You can install jedi/yapf packages in a separate virtualenv and just add $VIRTUAL_ENV/lib/python*/site-packages/ to your PYTHONPATH or to your virtualenv using add2virtualenv. Make sure you are using ...
Chillar Anand's user avatar
4 votes

elpy not picking up virtualenv

To work on a virtual environment, you need to call M-x pyvenv-workon and then select the preferred working environment. There is no need to install other packages as elpy comes with pyvenv package.
Chillar Anand's user avatar
3 votes

UnicodeEncodeError executing python in Emacs - not in Terminal

A solution that I found over on Stackoverflow was the following proposed here for a UnicodeDecodingError, which did work for me: (setenv "LANG" "en_US.UTF-8") (setenv "LC_ALL" "en_US.UTF-8") (setenv "...
n1k31t4's user avatar
  • 689
3 votes
Accepted

Docstrings don't automatically indent themselves in elpy-mode. How do I fix this?

elpy has a function elpy-open-and-indent-line-below which is binded to <S-return>. After """, you can hit <S-return> to open new line and indent automatically. You can use this at the end ...
Chillar Anand's user avatar
3 votes
Accepted

emacs: reinstall package after installation error

Have you tried to delete elpy package from M-x list-packages? You can do it by pressing d on the elpy package, and then pressing yes to confirm the action. If you already did that, you can go to ~/....
Fabrizio Piva's user avatar
3 votes

Make elpy-shell-send more intelligent

I haven't tried this thoroughly, but should work: 1. if region is active, evaluate it (this currently works), goto 3. 2. if region not active, evaluate current statement, goto 3. 3. Jump to the ...
George Moutsopoulos's user avatar
3 votes

elpy with ipython as rpc -- how to get good autocompletion

Elpy doesn't require emacs jedi package. Also they won't work well when both are configured. I guess there is some conflict between them. Use only elpy and you should be able to get completion in rpc ...
Chillar Anand's user avatar
3 votes
Accepted

Why does company autocomplete 1000 to "and"?

This is an old bug. It has been resolved with this patch: https://github.com/jorgenschaefer/elpy/pull/1279
Markus Grunwald's user avatar
3 votes

Activating a conda environment in emacs

Activate your virtualenv with: (pyvenv-activate "C:\Program Files\Anaconda3\envs\python2") If the binaries in your virtualenv are names "python2", you will need to set (setq python-shell-...
galaunay's user avatar
3 votes

Set RPC Python when using elpy with virtualenv

You can set elpy-rpc-virtualenv-path: Path to the virtualenv used by the RPC. Can be ‘default (create a dedicated virtualenv .emacs.d/elpy/rpc-venv), ‘system (use the system environment), ‘...
al0's user avatar
  • 151
3 votes

Any equivalent of R+ESS for python?

I managed to set up something close to my requirements above. Here it is, for people who may have my same needs. Let me stress that such requirements are very subjective, so the set-up below is not ...
pglpm's user avatar
  • 301
3 votes
Accepted

Python over-indentation warning E127

You should create in your home folder a .flake8rc file, and add some content to ignore that error - documented here and below is a small template: [flake8] # it's not a bug that we aren't using all ...
Ian's user avatar
  • 1,463
3 votes

Elpy Configuration...Setting Up a Virtual Environment and Pip Conflic with Conda? Need hand holding

Step 1: If you haven't already done so, go ahead and create a new conda environment. Let us say we want to create an anaconda environment with name py38 which uses python 3.8. Execute the following in ...
Cousin Dupree's user avatar
3 votes
Accepted

How to set python indent offset to 2 spaces in elpy emacs?

Is python-indent-guess-indent-offset set to t? If so, then it's probably looking at your file and deciding to set the python-indent-offset to some other value. Try setting it to nil in the :init for ...
db48x's user avatar
  • 18k
2 votes

How can I defer loading elpy using use-package?

I think it is possible with :after (use-package python :ensure t :defer t :mode ("\\.py\\'" . python-mode)) (use-package elpy :ensure t :after python :config (elpy-enable))
Jaime Arias's user avatar
2 votes
Accepted

Emacs freezes with ipython 5.0.0

ipython 5.0.0 by defautl uses prompt_toolkit which is really nice in a terminal but uses special characters for colors and completion that screws emacs display. Eventually it should be fixed but for ...
Lompik's user avatar
  • 1,224
2 votes

How to set up elpy to use python3?

Set the interpreter variable in your .emacs file: (setq python-shell-interpreter "python3" python-shell-interpreter-args "-i") Taken from elpy manual
init0's user avatar
  • 31
2 votes
Accepted

Cannot find elpy-format-code

elpy-format-code is available in elpy. You can run it with C-c C-r f or M-x elpy-format-code. If you want to run it automatically, you can use buffer hooks or a timer to run whenever you want.
Chillar Anand's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible