python-lsp / python-lsp-server

Fork of the python-language-server project, maintained by the Spyder IDE team and the community
MIT License
1.96k stars 195 forks source link

How to complete sympy, numpy, scipy etc #104

Open physicophilic opened 3 years ago

physicophilic commented 3 years ago

I'm able to complete functions in mpmath and math modules, but others mentioned here don't work. I see a similar issue on Jedi here, but I am not sure if this is entirely a thing of Jedi.

What can I try?

I'm using 1.24 version with Neovim's LSP.

Also, the executable is called pyls for me. Isn't it supposed to be pylsp?

ccordoba12 commented 3 years ago

Please read the last comment onn that issue, there is the solution:

https://github.com/davidhalter/jedi/issues/372#issuecomment-372858394

That won't give you completions for all objects, but for a substantial amount at least.

About the command, you probably have the previous version of this server installed.

physicophilic commented 3 years ago

Thank you. I had installed numpydoc before posting this issue. Later I saw that tt completes that sometimes - I don't know what's up with it.

About the command, you probably have the previous version of this server installed.

That's really weird. I did pip install python-lsp-server and then pip install python-lsp-server[all] after which the bin folder had only a pyls.

JonahZeng commented 2 years ago

Thank you. I had installed numpydoc before posting this issue. Later I saw that tt completes that sometimes - I don't know what's up with it.

About the command, you probably have the previous version of this server installed.

That's really weird. I did pip install python-lsp-server and then pip install python-lsp-server[all] after which the bin folder had only a pyls.

Did you sloved this problem or not? I met this issue too~, it seems like pylsp can't complete all the third module in 'site-packages' directory.

JonahZeng commented 2 years ago

pylsp completions 3rd party modules maybe it works for you.

Konfekt commented 3 weeks ago

While completion for Numpy works in general, it fails for built-ins like random. Is this rather a Jedi issue?