[issue42013] venv on Windows with symlinks is broken if invoked with -I
Bernat Gabor
report at bugs.python.org
Mon Oct 12 08:45:04 EDT 2020
Bernat Gabor <gaborjbernat at gmail.com> added the comment:
Ok, the missing link is that the python you run into needs to be also a symlink venv:
❯ py -m venv env --without-pip --clear --symlinks
❯ .\env\Scripts\python.exe -c "import venv, subprocess; venv.EnvBuilder(with_pip=False, symlinks=True).create('venv'); subprocess.check_call(['venv\\Scripts\\python.exe', '-Ic', 'import sys; print(sys.executable)'])"
Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'
----------
nosy: -FFY00
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42013>
_______________________________________
More information about the Python-bugs-list
mailing list