Eryk Sun added the comment: 0xC0000409 (3221226505) is STATUS_STACK_BUFFER_OVERRUN due to the CRT calling __fastfail(FAST_FAIL_FATAL_APP_EXIT) in abort(). This is expected behavior in Windows 8+ [1].
Initially I couldn't reproduce this error because Python found the standard library from the system Python via the registry. After archiving (as .reg) and removing the key "HKLM\SOFTWARE\Python\PythonCore\3.5", I reproduced the problem as follows: C:\Temp>myenv\Scripts\python.exe -Im ensurepip --upgrade --default-pip Fatal Python error: Py_Initialize: unable to load the file system codec ImportError: No module named 'encodings' Current thread 0x00000b9c (most recent call first): venv didn't copy over python35.zip to the Scripts directory. I don't know whether there's ever a legitimate reason to look for and copy a zipped standard library, or whether venv is only supported for use with a standard Python installation. I don't recommend doing this, but if you create the environment --without-pip, the command 'succeeds'. Then you'll have to manually copy python35.zip to Scripts and obtain activate.bat (edit this) and deactivate.bat from another install or the web. You still won't have ensurepip. If you want pip and setuptools, use get-pip.py from the web. This is all probably more trouble than you want. However, the embedding distribution is not intended to be a full Python installation that's suitable for development. [1]: https://msdn.microsoft.com/en-us/library/dn774154 ---------- nosy: +eryksun _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26065> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com