Description
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