Preface:
I've been dabbling with python programming for a mere few months now. Previously, I spent most of my programming time using C# with Visual Studio. In the Python world, I've been using PyCharm for my projects. It has excellent code-completion (much like the IntelliSense I'm used to) and a nice level of customizability. However, at the end of the day, I want something a little bit lighter and less clunky. I have seen videos of developers using Emacs with Python and I'm quite interested in learning it.
Setup:
- Python 3.6.0 is installed.
- I have downloaded emacs-25.1-x86_64-w64-mingw32.zip from the Emacs website.
- I have created a folder
C:\emacs
and extracted the zip file to this location - I have identified the Emacs home folder as
C:\Users\joshu\AppData\Roaming\.emacs.d
- I have created an
init.el
file in this directory since one did not exist
Python Integration:
Now, this is where I'm struggling. I'm still extremely new to the software so it's a bit hard to piece together information from the internet. Using this tutorial I have developed a baseline init.el
file. Due to my reputation points, I cannot include a third link here. The Gist containing my init.el
file is commented below.
When I open Emacs and open a python file, editing works. However, I'm running into the issues outlined below:
C-c C-c
returns an error. It seems to be a relatively wide-spread error upon Googling. By simply typingC-c C-c
again, the shell will appear with the code being executed; however, it gives me the linepython.el: native completion setup failed
Edit: The error is Warning (python): Your ‘python-shell-interpreter’ doesn’t seem to support
readline, yet ‘python-shell-completion-native’ was t and "python3" is not
part of the ‘python-shell-completion-native-disabled-interpreters’ list.
Native completions have been disabled locally.
- Python autocomplete doesn't seem to be working properly. When using PyCharm, I get a much, much more robust offering of completions. In the case of Emacs, if I begin typing something such as
from tkint
it will not suggesttkinter
. Similarly, if I start typingfrom math import a
it will not suggestabs
. I'm not sure at all how to configure Python autocompletion. I've read a few things about usingpip install jedi
and so on, but I haven't done any of that.
I realize this may be just as much a python question as an Emacs question in some regards. Any insight is appreciated.
init.el
file: gist.github.com/JoshuaGranger/27f897fd711bd15c4da896fb59871c2a