[New-bugs-announce] [issue42013] venv on Windows with symlinks is broken if invoked with -I

Bernat Gabor report at bugs.python.org
Mon Oct 12 06:55:28 EDT 2020


New submission from Bernat Gabor <gaborjbernat at gmail.com>:

Here's a small reproducible, run it on a Windows OS that has symlinks enabled:

import shutil
import venv
import subprocess

shutil.rmtree("venv", ignore_errors=True)
venv.EnvBuilder(with_pip=False, symlinks=True).create("venv")

# works
subprocess.check_call(["venv\\Scripts\\python.exe", "-c", "import sys; print(sys.executable)"])

# fails with No module named 'encodings'
subprocess.check_call(["venv\\Scripts\\python.exe", "-Ic", "import sys; print(sys.executable)"])

----------
messages: 378485
nosy: gaborjbernat
priority: normal
severity: normal
status: open
title: venv on Windows with symlinks is broken if invoked with -I
versions: Python 3.10, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42013>
_______________________________________


More information about the New-bugs-announce mailing list