【发布时间】:2015-11-04 09:09:46
【问题描述】:
成功运行
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
错误是:
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 : CommandNotFoundException
我认为我的问题是我不知道我在用 PowerShell 做什么。最初,我无法让pip 或virtualenv 工作,直到我进入:
[Environment]::SetEnvironmentVariable("Path", "$env:Path;C:\Python27\Scripts", "User")
一旦我这样做了,我就可以从任何位置运行pip 或virtualenv 而不会出现问题。我想不通的是如何成功运行 virtualenvwrapper 页面指定的最后两行。
【问题讨论】:
-
virtualenvwrapper 适用于 *nix 操作系统。
标签: python powershell virtualenvwrapper