0x1 背景
为了在虚拟环境下开发AI工具,项目经理给我们一个项目启动环境的安装guide,总共10步非常简单, 其中有几步如下, 计划10步总消耗Effort:0.5H
§ curl -sSL https://install.python-poetry.org | python -
§ cd ./ProjectDir/Lib/
§ poetry install
§ poetry shell
注:我觉得这个这个时间需要半天到一天,哈哈,可惜没有具体理由,只是个直觉。就默认开干。
0x2 问题及尝试
0x20 powershell下curl命令失败
启动powershell终端(vscode 默认启动的就是powershell). 结果直接就失败:
PS C:\Workspace\AIProject> curl -sSL https://install.python-poetry.org| python -
Invoke-WebRequest : A parameter cannot be found that matches parameter name 'sSL'.
At line:1 char:6
+ curl -sSL https://install.python-poetry.org| python -
+ ~~~~
+ CategoryInfo : InvalidArgument: (:) [Invoke-WebRequest], ParameterBindingException
+ FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
非常奇怪 怎么会调到invoke-webRequest呢?太迷惑了,只能helo以下copilot协助一下,结果如下:
question | #terminalSelection what's problem? |
answer | The error message you're seeing indicates that PowerShell is interpreting `--version` as a URL, which is incorrect. This is because `curl` in PowerShell is an alias for `Invoke-WebRequest`, and it doesn't support the same arguments as the traditional `curl` command found in Unix-like systems. To check the version |