Poetry add pkg got "HTTPResponse.__init__() got an unexpected keyword argument 'strict'"

huangapple go评论76阅读模式
英文:

Poetry add pkg got "HTTPResponse.__init__() got an unexpected keyword argument 'strict'"

问题

我使用conda创建了一个新的Python 3.10.9环境。我已经使用pip安装了poetry,在我添加了几个包之后,poetry add pkg命令出现了错误消息:

HTTPResponse.__init__() got an unexpected keyword argument 'strict'

我在网上搜索了这个问题,但没有找到答案,该如何解决?

希望能够使poetry add命令正常工作。

英文:

I create a new env with python 3.10.9 using conda. I have poetry installed using pip, after I add several packages, the poetry add pkg command didn't work with error message:

HTTPResponse.__init__() got an unexpected keyword argument 'strict'

enter image description here

I googled about the problem and no answers to it, how to solve it?

have the poetry add command working

答案1

得分: 4

降级 urllib3 包(<2.0)。

英文:

downgrade urllib3 package (<2.0)

答案2

得分: 3

以下是翻译好的内容:

"poetry"对"liburl3"的依赖存在错误。

首先,您可以尝试更新poetry

pip install --upgrade poetry

然后再次运行poetry,检查是否仍然出现错误。

如果是,可以通过降级urllib3包来解决依赖错误:

pip install "urllib3>=1.26.16,<2.0.0"
英文:

There is an error with poetry's dependency on liburl3.

First, you can try updating poetry:

pip install --upgrade poetry

Try running poetry again and check if the error still appears.

If yes, the dependency error can be resolved by downgrading the urllib3 package:

pip install &quot;urllib3&gt;=1.26.16,&lt;2.0.0&quot;

答案3

得分: -1

use pip downgrade urllib3 package to 1.26.15

要降级 urllib3 包到 1.26.15 版本。

to avoid automatically upgrading urllib3 when running the poetry command, it is better to fix urllib3 version like this:

为了在运行 poetry 命令时避免自动升级 urllib3,最好像这样固定 urllib3 版本:

poetry add urllib3==1.26.15
英文:

use pip downgrade urllib3 package to 1.26.15

to avoid automatically upgrading urllib3 when running the poetry command, it is better to fix urllib3 version like this:

poetry add urllib3==1.26.15

huangapple
  • 本文由 发表于 2023年5月20日 21:32:42
  • 转载请务必保留本文链接:https://go.coder-hub.com/76295497.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定