When I start typing a line, for example plt.subp
it will show suggestions from matplotlib.pyplot
, if I have imported the library above. This is the expected behaviour. The problem is that this is not happening with numpy. For example say I want to write np.linspace
; while I am typing, at no point in time it will show me the the dropdown menu with suggestions (e.g. when I write np.l
I should get suggestions like log
, log10
, linspace
, logspace
, etc, but that does not happen). The weird thing is that after I type for example np.linspace(
, Jedi will show me all the relevant information about linspace
.
The setup: I am trying to set up VSCodium as a python IDE. In order to isolate the problem as much as I can, I have created a virtual environment and I use this as my Python Interpreter. I have installed a few libraries in the virtual environment, including numpy. I use Jedi as my language server. I have also installed the Python Extension.
Am I missing something obvious here? Do you have any troubleshooting suggestions?
Notes:
- When I used anaconda as my interpreter, everything worked as expected. I have other issues with anaconda so I do not use it anymore.
- When I use /bin/python as my interpreter this problem appears as well (I numpy installed in my system as well).
- This is only happening in VSCodium. If I open a .py file with gvim for example, everything works as expected. This would be irrelevant as vim uses a different LSP (vim-lsp/asyncomplete/pylsp-all), but the weird thing is that when I used vim outside of the virtual environment, I would not get autocomplete suggestions for any imported module, although I would get suggestions for internal python commands. Vim/Gvim also worked as expected with the conda base activated.
Workaround
Using pylance instead of jedi solves the above problem. But this is not a solution of course.