jorgenschaefer / elpy

Emacs Python Development Environment
GNU General Public License v3.0
1.9k stars 261 forks source link

newby installation question #103

Closed luckjiff closed 11 years ago

luckjiff commented 11 years ago

I have the python side of the equation worked out.

On the emacs side I am behind a firewall so that (add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/")) does not work.

Can I just put elpy.el in ~/.emacs.d/lisp/ and (require 'el-py)

Perhaps someone has already written the solution to this. thanks. Glen

jorgenschaefer commented 11 years ago

You can put the elpy repository in your ~/.emacs.d/lisp/elpy/ and add that path to both your load-path as well as your PYTHONPATH (for the elpy module).

luckjiff commented 11 years ago

Thank you for your help here. On the python side I am all set. I am using https://code.google.com/p/winpython/ and can import elpy, jedi, rope, flake8 with no issue.

On the emacs side having issues. I have put the repository in ~/.emacs.d/lisp/elpy/

I put the following in my ~/.emacs (add-to-list 'load-path "~/.emacs.d/lisp/elpy/") (elpy-enable) (elpy-use-ipython) I get Warning (initialization): An error occurred while loading `f:/.emacs': Symbol's function definition is void: elpy-enable

I tried this in my ~/.emacs (add-to-list 'load-path "~/.emacs.d/lisp/elpy/") (require 'elpy) (elpy-enable) (elpy-use-ipython)

I get Warning (initialization): An error occurred while loading `f:/.emacs': File error: Cannot open load file, auto-complete-config

I have to be close now. Thanks. Sorry for the hassle.

jorgenschaefer commented 11 years ago

Well, you will need to install all packages that elpy depends on (auto-complete, fuzzy, yasnippet, virtualenv, highlight-indentation, find-file-in-project, idomenu, nose, iedit). Doing so manually is quite some work.

You can find the repositories for most of them in my own repository list (https://github.com/jorgenschaefer?tab=repositories), except for nose (https://bitbucket.org/durin42/nosemacs/src) and idomenu (http://www.emacswiki.org/emacs/idomenu.el). I can't help you with the installation of the third-party libraries, though.

luckjiff commented 11 years ago

Thank Jorgen. I managed to work out the proxy issue. Two more questions.

  1. How can I map the send region to C-c C-r instead of C-c C-c. Like this? (define-key elpy-mode-map (kbd "C-c C-r") 'elpy-shell-send-region-or-buffer)
  2. This issue has to do with python.el. If code is indented and you want to send it to the inferior process always get indentation errors using send region. Is there any way to deal with this. Thanks!
jorgenschaefer commented 11 years ago

The define-key statement should work. Remember that you're overriding the elpy-refactor key binding.

This shouldn't happen if you are using elpy-shell-send-region-or-buffer. How are you sending the data to the subprocess? Also, which Emacs and python.el versions are you using?

jorgenschaefer commented 11 years ago

No further contact. Feel free to reopen the ticket if you have further questions. :-)