Ultisnips: DeprecationWarning: The imp module is deprecated in favour of importlib;

Created on 30 Jun 2018  路  4Comments  路  Source: SirVer/ultisnips

  • Macvim 8.1-149_1
  • VIM - Vi IMproved 8.1

Expected behavior:

Zero warnings

Actual behavior:

Upon typing any key after going into insert mode, it gives this warning.

Steps to reproduce

Open vim, enter insert mode, type any key.

medium thirdparty problem

Most helpful comment

To anybody else who's having this issue, I think this is the best workaround:

Regardless of installed plugins, silently execute python3 once on the top of your vimrc:

if has('python3')
  silent! python3 1
endif

All 4 comments

It seems that the python3.7 update has caused this issue.

I'm using vim and fixed with this command:
brew reinstall vim --with-python@2

If you are using macvim, maybe you can try this command:
brew reinstall macvim --with-override-system-vim --with-python@2

This will happen when running any python3 (while using python3.7) in vim. not specific to Ultisnips.

See https://github.com/vim/vim/issues/3117

To anybody else who's having this issue, I think this is the best workaround:

Regardless of installed plugins, silently execute python3 once on the top of your vimrc:

if has('python3')
  silent! python3 1
endif

The issue has been fixed in Vim with the patch 8.1.0201.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jonathf picture jonathf  路  6Comments

MikeDacre picture MikeDacre  路  3Comments

PratikBhusal picture PratikBhusal  路  3Comments

ghost picture ghost  路  8Comments

andreyorst picture andreyorst  路  6Comments