pappasam / coc-jedi

coc.nvim wrapper for https://github.com/pappasam/jedi-language-server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Install importlib_metadata in the virtualenv

Fenkiou opened this issue · comments

Hello,

I'm currently experiencing a small issue (not a blocking one at all).

I started to use coc, with coc-jedi using a python version >=3.8 and that worked perfectly.

But recently, I launched vim inside a project which uses python 3.6.6. And update coc plugins.

Seems like coc-jedi needed an update (and jedi-language-server too was outdated). So coc-jedi ran the update but it ran it using the python 3.6.6 interpreter.

So the virtualenv created is based on python 3.6.6 and now each time coc-jedi starts to run, it tries to get the version, but it cannot retrieve it because if we're below 3.8, we have to use importlib_metadata (see here) which is not installed. So it recreate the virtualenv each time.

I can fix the issue either by:

  • reinstalling coc-jedi using a python version > 3.8
  • install importlib_metadata inside actual coc-jedi virtualenv (which will break once new update is installed if I'm using python <3.8 interpreter)

Can we add importlib_metadata package installation inside the virtualenv? Or maybe there is another solution :)

Anyway, thanks for the plugin!

Thanks for this issue! I'll add a conditional dependency for importlib_metadata to jedi-language-server and release later today

Should be resolved in version 0.25.2!

Works perfectly, thanks for the quick fix!