在powershell
中执行poetry
官网命令
PS C:\Users\Administrator> (Invoke-WebRequest -Uri https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py -UseBasicParsing).Content | python
报错
Invoke-WebRequest : 基础连接已经关闭: 发送时发生错误。
所在位置 行:1 字符: 2
+ (Invoke-WebRequest -Uri https://raw.githubusercontent.com/python-poet ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest],WebExce
ption
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
解决方法:使用代理
(Invoke-WebRequest -proxy http://127.0.0.1:1080 -Uri https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py -UseBasicParsing).Content | python
环境变量增加poetry
的路径%USERPROFILE%\.poetry\bin
重新打开powershell
验证poetry
是否安装成功
PS C:\Users\Administrator> poetry --version
Poetry version 1.0.5
出现版本号,就已经安装成功啦