Skip to content

If the working directory and the venv are on different disks, venv doesn't work in bash on Windows #103088

Closed
@Zabolekar

Description

@Zabolekar

Environment

  • OS: Windows 10
  • Architecture: x86_64
  • Shell: bash 4.4.23, part of the git 2.37.0 install
  • Python version: 3.11.1
  • Output of path/to/python -m pip list:
Package    Version
---------- -------
pip        23.0.1
setuptools 65.5.0

Issue

When I create a venv on D: and use it from C:, executables like pip or python can't be found:

$ pwd
/d
$ /path/to/python -m venv myenv
$ . myenv/Scripts/activate
$ pip --version
pip 22.3.1 from D:\myenv\Lib\site-packages\pip (python 3.11)
$ cd /c
$ pip --version
bash: \myenv/Scripts/pip: No such file or directory

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    OS-windowsstdlibPython modules in the Lib dirtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions