I'm trying to find the solution for days, but I didn't get it yet. So, if you guys could help me I'd appreciate it.
I've been using emacs to code in Python, I'm a very beginner using emacs, so, I decided to install the autocomplete Jedi feature. In some tutorials I've found they ask me to add this line in the ./emacs file
(add-hook 'python-mode-hook 'auto-complete-mode)
(add-hook 'python-mode-hook 'jedi:ac-setup)
I add those lines in the file and restart Emacs, however when I open some .py file they report me some errors. ps. I've installed Jedi through the Melpa package! ps. I'm using Ubuntu 12.04
Thanks in advance!
A good idea when asking a question when it relates to Emacs, is specifying what operating system you are using as the solution might be OSX/Linux centric vs Windows. As well you might want to post specific error messages.
You have to enter those lines in your emacs configuration file, which on Linux/OSX would be in ~/.emacs
. The tilde meaning your home folder. You can also put your emacs configuration in ~/.emacs.d/init.el
.
Without your question being more specific, all I can say is that I use the el-get
package manager to install jedi. And use the following in my configuration to get things working.
(add-hook 'python-mode-hook 'jedi:setup)
(setq jedi:setup-keys t)
(setq jedi:complete-on-dot t)
Also make sure you have your PYTHONPATH environment variable setup correctly. You would put something like export $PYTHONPATH=/path/to/python/libraries
in your ~/.bashrc
. This would only be necessary if you installed your python modules in a non-standard place.
See for instance, Emacs deferred errors for similar errors to what you are getting.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With