1

I am new to vim. As much as I love it, there seem to be a lot of bugs or errors every time I try doing something.

I am unable to run the plugin "browserlink.vim" (https://github.com/jaxbot/browserlink.vim). It shows the following error:

Fatal Python error: Py_Initialize: unable to load the file system codec ImportError: No module named 'encodings'

I have searched for fixing but I don't understand exactly what to do from the documentation found on StackOverflow and Github issues. For instance, when running the command :py print(1) it throws the error E887: Sorry, this command is disabled, the Python's site module could not be loaded.

My vim version is 8.0 and the python version I have installed is 3.6.5 (64bits) and I use Windows 10. Can anyone help me?

1

Add an environment variable "PYTHONPATH" which points to the installation location of Python and restart the editor.

  • Welcome to our site! It would be useful for future reader to explain with a bit more details why this variable is necessary and why it should solve OP's problem. – statox Dec 12 '18 at 12:54
0

I ran into this same thing, specifically with Anaconda Python. It appears to be a recent change to some of their DLLs and it has nothing to do with Vim.

https://github.com/ContinuumIO/anaconda-issues/issues/10660

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.