Some paths within the virtualenv are slightly different on Windows: scripts and executables on Windows go in ENV\Scripts\ instead of ENV/bin/ and libraries go in ENV\Lib\ rather than ENV/lib/.
Based on your active shell (CMD.exe or Powershell.exe), Windows will use either activate.bat or activate.ps1 (as appropriate) to activate the virtual environment.
如果您使用的是Git Bash for Windows,我发现以下命令可以激活环境:$source(path to environment)/Scripts/activate
我在Windows 10、Python(v3.7)、Pip(v19.0.3)、virtualenv(v16.4.3)上使用Git Bash
在Windows上,这是完全正确的。仅在POSIX系统上创建
bin
目录。从文档的Windows Notes部分:对于Windows,运行
\path\to\env\Scripts\activate
激活virtualenv。从documentation再次:相关问题 更多 >
编程相关推荐