JSonschema 4.4.0不提供额外的拼发'

发布于 2025-01-21 10:18:30 字数 1017 浏览 2 评论 0原文

因此,我正在尝试运行一些代码,并继续遇到以下错误:

File "/opt/conda/lib/python3.8/site-packages/pkg_resources/__init__.py", line 770, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'isoduration; extra == "format"' distribution was not found and is required by jsonschema

但是,在运行后,

pip uninstall -y jsonschema && pip install -U jsonschema && pip install jsonschema[isoduration]

我可以

Requirement already satisfied: jsonschema[isoduration] in /opt/conda/lib/python3.8/site-packages (4.4.0)
  WARNING: jsonschema 4.4.0 does not provide the extra 'isoduration'

肯定的是,再次运行代码,我会收到与以前相同的错误消息。

我尝试了:

  • pip installisuration y/code>,但不同格式显示为 缺少
  • rm -rf ...安装 jsonschema
  • jsonschema == 3.2.0,缺少硬删除jsonschema rm -rf ... ,它据说它对我的朋友

i'我对这里发生的事情非常困惑,任何帮助将不胜感激。

So I'm trying to run some piece of code and keep getting the following error:

File "/opt/conda/lib/python3.8/site-packages/pkg_resources/__init__.py", line 770, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'isoduration; extra == "format"' distribution was not found and is required by jsonschema

However, after running

pip uninstall -y jsonschema && pip install -U jsonschema && pip install jsonschema[isoduration]

I get

Requirement already satisfied: jsonschema[isoduration] in /opt/conda/lib/python3.8/site-packages (4.4.0)
  WARNING: jsonschema 4.4.0 does not provide the extra 'isoduration'

and surely, running my code again I get the same error message as before.

I tried:

  • pip install isoduration, but different format showed up as
    missing
  • hard removing jsonschema with rm -rf ...
  • installing jsonschema==3.2.0 as it supposedly worked for a friend of mine

I'm very confused with what's going on here, any help would be appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

辞取 2025-01-28 10:18:30

我认为您应该安装iSoduration

和/或使用'格式'安装额外。来自

有许多默认的检查器,使造型器知道如何验证。可以通过检查formatchecker.checkers属性来查看它们的名称。 只有在适当的软件包可以使用的情况下,才能使用某些检查器。确保您拥有所需的最简单方法是使用form格式 - nongpl setuptools额外 - ie

  $ pip安装jsonschema [格式]
 

I think you should install isoduration,

and/or use 'format' install extra. From the docs (emphasis mine):

There are a number of default checkers that FormatCheckers know how to validate. Their names can be viewed by inspecting the FormatChecker.checkers attribute. Certain checkers will only be available if an appropriate package is available for use. The easiest way to ensure you have what is needed is to install jsonschema using the format or format-nongpl setuptools extra – i.e.

$ pip install jsonschema[format]
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文