Normal behaviour of virtualenv is to create new versions of a lot of the Python code in Scripts/ (https://www.python.org/dev/peps/pep-0405/#creating-virtual-environments), including the executable.
the code in cpython that looks for venvs is this:
executable = sys.executable
exe_dir, _ = os.path.split(os.path.abspath(executable))
site_prefix = os.path.dirname(exe_dir)
sys._home = None
conf_basename = 'pyvenv.cfg'
candidate_confs = [
conffile for conffile in (
os.path.join(exe_dir, conf_basename),
os.path.join(site_prefix, conf_basename)
)
if os.path.isfile(conffile)
]
I tried doing the same thing using pip.bat as a template and it couldn't find it - pip.bat calls .python/python.exe, which resolves to Program files/talon/python.exe, then python looks for the pyvenv.cfg in Program Files/talon and Program Files and doesn't find it
Normal behaviour of
virtualenvis to create new versions of a lot of the Python code inScripts/(https://www.python.org/dev/peps/pep-0405/#creating-virtual-environments), including the executable.the code in cpython that looks for venvs is this:
I tried doing the same thing using
pip.batas a template and it couldn't find it - pip.bat calls.python/python.exe, which resolves toProgram files/talon/python.exe, then python looks for the pyvenv.cfg inProgram Files/talonandProgram Filesand doesn't find it