Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

autocomplete numpy, sympy #119

Open
xin-jin opened this issue Jan 4, 2014 · 5 comments
Open

autocomplete numpy, sympy #119

xin-jin opened this issue Jan 4, 2014 · 5 comments

Comments

@xin-jin
Copy link

xin-jin commented Jan 4, 2014

I am running emacs24+python3 on Debian testing. I installed jedi via package.el.

I faced the same situation as in http://stackoverflow.com/questions/14708453/emacs-jedi-does-not-find-numpy-completions

But I am still not able to get it right. Here are my configurations related to jedi:

(require 'auto-complete)
(require 'jedi)
(setq jedi:server-command (list "/usr/bin/python3" jedi:server-script))
(ac-linum-workaround)
(add-hook 'python-mode-hook 'jedi:setup)
(setq jedi:server-args
      '("--sys-path" "/usr/lib/python3/dist-packages"
        "--sys-path" "/usr/local/lib/python3.3/dist-packages"))
(setq jedi:setup-keys t)                      ; optional
(setq jedi:complete-on-dot t)                 ; optional

I also tried the virtualenv method (make PYTHON=python3 requirements) but the result is the same.

Thanks!

@xin-jin
Copy link
Author

xin-jin commented Jan 4, 2014

But everything else works fine. For example, when I type "x = sympy.sym", it can complete "x = sympy.symbols". Is it normal?

@Dronte
Copy link

Dronte commented Jan 4, 2014

I did not check that, but try to put (require 'jedi) line below the line where you set server args.

@xin-jin
Copy link
Author

xin-jin commented Jan 4, 2014

Thank you for your reply, Dronte. But it does not seem to work. My current setting:

(require 'auto-complete)
(setq jedi:server-args
      '("--sys-path" "/usr/lib/python3/dist-packages"
        "--sys-path" "/usr/local/lib/python3.3/dist-packages"))
(require 'jedi)
(setq jedi:server-command (list "/usr/bin/python3" jedi:server-script))
(ac-linum-workaround)
(add-hook 'python-mode-hook 'jedi:setup)
(setq jedi:setup-keys t)                      ; optional
(setq jedi:complete-on-dot t)                 ; optional 

@fedeinthemix
Copy link

I have the same problem: with numpy and scipy I don't get function suggestions and doc. Works fine with other libraries such as, e.g., "os".

I'm using
jedi 0.8.0
jedi.el 0.2.0alpha2
epc 0.05

My jedi.el configuration is

(setq jedi:server-command '("c:/Anaconda/Scripts/jediepcserver.exe"))
(add-hook 'python-mode-hook 'jedi:setup)
(setq jedi:complete-on-dot t)

Note that I'm using the Anaconda python distribution on Windows 7 and have installed jediepcserver manually with
pip install /path to jedi/

@syohex
Copy link
Collaborator

syohex commented May 22, 2014

I suppose this is jedi issue.

davidhalter/jedi#372

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants