venv windows: Missing `venv/bin` folder, should symlink `venv/bin` -> `venv/Scripts`
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 77.2k
- フォーク
- 36k
- PR マージ指標
- PR 指標を取得中
説明
Bug report
Entering into a venv environment on Windows doesn't work well.
The command to enter into a virtual environment on Linux and MacOS looks like this:
source venv/bin/activate.sh
On Windows however, there is no venv/bin but instead venv/Scripts, which appears to be a similar / same folder to venv/bin. Therefore on windows (git-bash) source venv/bin/activate.sh does not work
As a workaround in my projects, I simply create a symlink using the windows junction point feature (mkdir /j) so that symlink venv/bin points to venv/Scripts and then everything seems to work right.
Windows gained non-admin symlinking in 2019
The fix for this problem only became available in 2019 since mkdir /j was added or enabled for windows directory symlinks. Prior to this, a windows host needed to have admin privilege's or a registry hack in order to symlink a folder.
Your environment
- Windows 10, in
git-bash - python 3.10.7
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、Windows 環境の作成を担う Python venv の実装を特定し、その Scripts レイアウトを Linux および macOS で使用される bin レイアウトと比較します。Windows 上の Git Bash から提案された動作を検証し、venv/bin による有効化が既存の Windows の使用方法を壊さずに機能することを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- tooling
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100