【发布时间】:2012-05-14 03:01:07
【问题描述】:
当我尝试从 GIT bash mingw32 激活我的 virtualenv 时,我没有得到预期的响应。
注意:py 是我的 Google Drive 文件夹中 Python 项目的文件夹。 hy 是我运行 virtualenv --distribute hy 时创建的 virtualenv 文件夹。
s3z@s3z ~/Google Drive/py/hy
$ Scripts/activate
所以你看,s3z@s3z ~/Google Drive/py/hy之前没有出现预期的(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
有什么想法吗?
【问题讨论】:
标签: python git bash virtualenv git-bash