当我尝试从 GIT bash mingw32 激活我的 virtualenv 时,我没有得到预期的响应。
注意:py
是我的 Google Drive 文件夹中 Python 项目的文件夹。hy
是我运行时创建的 virtualenv 文件夹virtualenv --distribute hy
。
s3z@s3z ~/Google Drive/py/hy
$ Scripts/activate
所以你看,之前没有出现预期的(hy)s3z@s3z ~/Google Drive/py/hy
s3z@s3z ~/Google Drive/py/hy
$ Scripts/activate.bat
Scripts/activate.bat: line 1: @echo: command not found
Scripts/activate.bat: line 4: syntax error near unexpected token `('
Scripts/activate.bat: line 4: `if not defined PROMPT ('
当定位实际文件名时,activate.bat
我会收到错误消息。然后我尝试停用以查看会发生什么,因为我认为 virtualenv 可能已激活但被隐藏。
s3z@s3z ~/Google Drive/py/hy
$ Scripts/deactivate.bat
Scripts/deactivate.bat: line 1: @echo: command not found
Scripts/deactivate.bat: line 3: syntax error near unexpected token `('
Scripts/deactivate.bat: line 3: `if defined _OLD_VIRTUAL_PROMPT ('
s3z@s3z ~/Google Drive/py/hy
$ Scripts/deactivate
sh.exe": Scripts/deactivate: No such file or directory
有任何想法吗?