vim crashes in windows when trying to execute python 3 command

35 views
Skip to first unread message

skeept

unread,
Jul 13, 2019, 11:10:13 PM7/13/19
to vim_use
I had to change computers recently. In my previous computer I was compiling vim with python to avoid this issue also, but I had no time to compile it yet
so I downloaded a 64 bit build of vim for windows:

MS-Windows 64-bit console version
Included patches: 1-1649
Compiled by appveyor@APPVYR-WIN


I also downloaded conda python distribution and I have the folder where python.exe is located in my PATH variable.

Without a vimrc or vimfiles folder if I do the following:

:py3 import os

then I get the following error message and vim crashes:


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

Current thread 0x00007ed4 (most recent call first):


I understand there might be something I can put in my vimrc to avoid this, but i don't think vim should crash this way.

Christian Brabandt

unread,
Jul 14, 2019, 9:20:06 AM7/14/19
to vim_use
Although nowhere stated explicitly, I believe Vims python implementation
is not exactly compatible with conda. Please try with a normal python
distribution.


Best,
Christian
--
Man soll die lieben, über die man befielt, aber man soll es ihnen
nicht sagen.
-- Antoine de Saint-Exypery

skeept

unread,
Jul 14, 2019, 9:35:59 AM7/14/19
to vim_use

> Although nowhere stated explicitly, I believe Vims python implementation
> is not exactly compatible with conda. Please try with a normal python
> distribution.
>
>
> Best,
> Christian
> --
> Man soll die lieben, über die man befielt, aber man soll es ihnen
> nicht sagen.
> -- Antoine de Saint-Exypery



Thank you Christian,

I confirmed that is the case. When I try using another python distribution it doesn't crash.
I hope at some point vim or conda can fix the issue, for now my best choice is to find time to compile vim without python.

Best,
Jorge

Christian Brabandt

unread,
Jul 14, 2019, 9:39:07 AM7/14/19
to vim_use

On So, 14 Jul 2019, skeept wrote:

> I confirmed that is the case. When I try using another python distribution it doesn't crash.
> I hope at some point vim or conda can fix the issue, for now my best choice is to find time to compile vim without python.

It is probably an implementation detail that differs and that makes Vim
crash.

If someone who knows the exact details of python embedding and Vim can
pinpoint the problem, we can actually fix it, but so far nobody has done
it :(

Best,
Christian
--
Letzte Worte eines Postboten:
"Du bist aber ein lieber Hund."
Reply all
Reply to author
Forward
0 new messages