无法让 virtualenvwrapper 工作
Can't get virtualenvwrapper to work
成功运行
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 适用于类 Unix 操作系统,例如Linux 和 OS X. 看看 virtualenvwrapper-powershell. It's officially recommended by virtualenvwrapper.
有virtualenvwrapper-win for the Windows Command Prompt. It's also recommended by virtualenvwrapper.
成功运行
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 适用于类 Unix 操作系统,例如Linux 和 OS X. 看看 virtualenvwrapper-powershell. It's officially recommended by virtualenvwrapper.
有virtualenvwrapper-win for the Windows Command Prompt. It's also recommended by virtualenvwrapper.