重安装python(版本不对)导致poetry无法安装使用

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值