无法让virtualenvwrapper工作

时间:2015-08-11 23:30:37

标签: python powershell virtualenvwrapper

成功运行

static

但是我无法运行接下来的两个命令。

pip install virtualenvwrapper

错误是:

PS C:> export WORKON_HOME=~/Envs
The term 'export' is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that
the path is correct and try again.
At line:1 char:7
+ export <<<<  WORKON_HOME=~/Envs
    + CategoryInfo          : ObjectNotFound: (export:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

错误是:

PS C:> source /usr/local/bin/virtualenvwrapper.sh

我认为我的问题是我不知道我在使用PowerShell做什么。最初,在我进入之前,我无法让The term 'source' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:7 + source <<<< /usr/local/bin/virtualenvwrapper.sh + CategoryInfo : ObjectNotFound: (source:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundExceptionpip完成工作:

virtualenv

一旦我这样做,我就可以毫无问题地从任何位置运行[Environment]::SetEnvironmentVariable("Path", "$env:Path;C:\Python27\Scripts", "User") pip。我无法弄清楚如何成功运行virtualenvwrapper页面指定的最后两行。

1 个答案:

答案 0 :(得分:1)

virtualenvwrapper适用于类Unix操作系统,例如: Linux和OS X.看看virtualenvwrapper-powershell。这是officially recommended by virtualenvwrapper

Windows命令提示符有virtualenvwrapper-win。它也是recommended by virtualenvwrapper

还有instructions for MSYS