【问题标题】:sh.exe no such file or directory Python, GitBashsh.exe 没有这样的文件或目录 Python、GitBash
【发布时间】:2014-06-29 12:43:32
【问题描述】:

我尝试在 GitBash (Windows 7) 中设置 virtualenvwrapper,但收到错误消息“sh.exe”no such file or directory。 我在 Bash 中写下一行:

1 $ export WORKON_HOME=$HOME/.virtualenvs
2 $ export MSYS_HOME=/c/msys/1.0
3 $ source /usr/local/bin/virtualenvwrapper.sh

最后一行给我一个错误:

 source /usr/local/bin/virtualenvwrapper.sh
 sh.exe: /usr/local/bin/virtualenvwrapper.sh: No such file or directory

我用于帮助这篇文章:Python setup : command not found。当我在命令行中运行 virtualenvwrapper 时,一切正常,但在 GitBash 中没有。

【问题讨论】:

    标签: python git virtualenv virtualenvwrapper


    【解决方案1】:

    在您的硬盘上找到virtualenvwrapper.sh,而不是/usr/local/bin/,指定正确的目录名称。

    【讨论】:

    • 我写文件夹的名称而不是/usr/local/bin,这里是virtualenvwrapper.sh。在我的电脑上是/c/Python27/Scripts/virtualenvwrapper.sh,我收到下一条关于错误的消息:$ source /c/Python27/Scripts/virtualenvwrapper.sh sh.exe":mktemp:command not found ERROR: virtualenvwrapper could not create a temporary file name
    • 这是另一个错误,请在 Stack Overflow 上单独提问。 (提示:也许export TMPDIR=/c/windows/temp 或其他方法会起作用。)
    猜你喜欢
    • 2019-01-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-06-17
    • 2021-06-24
    相关资源
    最近更新 更多