GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — venv: Activation in fish inside msys2 (or similar) breaks PATH · Issue #151042 · python/cpython

venv: Activation in fish inside msys2 (or similar) breaks PATH #151042

New issue
Copy link
New issue
Copy link
Closed
Closed
venv: Activation in fish inside msys2 (or similar) breaks PATH#151042
Copy link
Labels
OS-windowsstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-venvRelated to the venv moduleRelated to the venv moduletype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@LuNoX
LuNoX
opened on Jun 7, 2026
Issue body actions

Bug report

Bug description:

When running source .venv/Scripts/activate.fish on windows from a fish shell inside msys2 ucrt64 it breaks the PATH.
Equivalently to gh-103325 activating a venv inside fish (from Cygwin, MSYS or MinGW) on windows will lead to mixing Unix and Windows path styles which then has knockon effects like breaking the PATH when

cpython/Lib/venv/scripts/common/activate.fish

Line 39 in 5755d0f

set -gx PATH "$VIRTUAL_ENV/"__VENV_BIN_NAME__ $PATH
runs.

To reproduce:

  • Boot a Windows partition
  • Install Cygwin, MSYS2, MinGW or equivalent
  • Install fish from inside Cygwin, MSYS2, MinGW or equivalent
  • Install python
  • cd into a python project of your choice
  • Run your installed python's venv command
  • Run echo $PATH
  • Run source .venv/Scripts/activate.fish
  • Run echo $PATH

Notice that the second PATH output contains a new broken/mismatched entry at the start which will in turn break all future uses of PATH.

CPython versions tested on:

CPython main branch

Operating systems tested on:

Windows

Linked PRs

  • gh-151042: venv: Pass VIRTUAL_ENV through cygpath inside fish on Windows #151043

Activity

  1. LuNoX
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on Jun 7, 2026
  2. StanFromIreland
    added
    OS-windows
    stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directory
    topic-venvRelated to the venv moduleRelated to the venv module
    on Jun 7, 2026
  3. vsajip
    added a commit that references this issue on Jun 22, 2026

    gh-151042: venv: Pass VIRTUAL_ENV through cygpath inside fish on Wind…

    476b649
  4. pyctrl
    added a commit that references this issue on Jul 5, 2026

    pythongh-151042: venv: Pass VIRTUAL_ENV through cygpath inside fish o…

    be92b29
  5. aisk
    closed this as completedon Aug 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    OS-windowsstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-venvRelated to the venv moduleRelated to the venv moduletype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.