Skip to content

pip.bat doesn't install to venv #145

Description

@mirober

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions