已解析的依赖项中存在不兼容的版本

2024-01-19

我正在尝试运行我的 python 项目,该项目似乎在我的 Mac 上运行良好(在 pycharm 中最好,不太好,但可以在 VSCode 中运行),但在 VSCode 中的树莓派上运行得很糟糕。每当我运行pipenv shell然后一个pipenv install它只是抱怨这个错误:

Pipfile.lock (e9a11d) out of date, updating to (47943b)...
Locking [dev-packages] dependencies...
Locking [packages] dependencies...
Building requirements...
Resolving dependencies...
✘ Locking Failed! 
[ResolutionFailure]:   File "/home/nick/.local/lib/python3.7/site-packages/pipenv/resolver.py", line 741, in _main
[ResolutionFailure]:       resolve_packages(pre, clear, verbose, system, write, requirements_dir, packages, dev)
[ResolutionFailure]:   File "/home/nick/.local/lib/python3.7/site-packages/pipenv/resolver.py", line 709, in resolve_packages
[ResolutionFailure]:       requirements_dir=requirements_dir,
[ResolutionFailure]:   File "/home/nick/.local/lib/python3.7/site-packages/pipenv/resolver.py", line 692, in resolve
[ResolutionFailure]:       req_dir=requirements_dir
[ResolutionFailure]:   File "/home/nick/.local/lib/python3.7/site-packages/pipenv/utils.py", line 1403, in resolve_deps
[ResolutionFailure]:       req_dir=req_dir,
[ResolutionFailure]:   File "/home/nick/.local/lib/python3.7/site-packages/pipenv/utils.py", line 1108, in actually_resolve_deps
[ResolutionFailure]:       resolver.resolve()
[ResolutionFailure]:   File "/home/nick/.local/lib/python3.7/site-packages/pipenv/utils.py", line 833, in resolve
[ResolutionFailure]:       raise ResolutionFailure(message=str(e))
[pipenv.exceptions.ResolutionFailure]: Warning: Your dependencies could not be resolved. You likely have a mismatch in your sub-dependencies.
  First try clearing your dependency cache with $ pipenv lock --clear, then try the original command again.
 Alternatively, you can use $ pipenv install --skip-lock to bypass this mechanism, then run $ pipenv graph to inspect the situation.
  Hint: try $ pipenv lock --pre if it is a pre-release dependency.
ERROR: Could not find a version that matches graphene-django>=3.0.0b1 (from -r /tmp/pipenvcczdc6ayrequirements/pipenv-eg1jqra7-constraints.txt (line 3))
Tried: 1.0, 1.1.0, 1.2.0, 1.2.1, 1.3, 2.0.0, 2.0.0, 2.1.0, 2.1.0, 2.2.0, 2.2.0, 2.3.0, 2.3.0, 2.3.2, 2.3.2, 2.4.0, 2.4.0, 2.5.0, 2.5.0, 2.6.0, 2.6.0, 2.7.0, 2.7.0, 2.7.1, 2.7.1, 2.8.0, 2.8.0, 2.8.1, 2.8.1, 2.8.2, 2.8.2, 2.9.0, 2.9.0, 2.9.1, 2.9.1, 2.10.0, 2.10.0, 2.10.1, 2.10.1, 2.11.0, 2.11.0, 2.11.1, 2.11.1, 2.12.0, 2.12.0, 2.12.1, 2.12.1, 2.13.0, 2.13.0, 2.14.0, 2.14.0, 2.15.0, 2.15.0
Skipped pre-versions: 1.0.dev20160909000001, 1.0.dev20160910000001, 1.0.dev20160917000001, 1.0.dev20160919000001, 1.0.dev20160919000002, 1.0.dev20160919000003, 1.0.dev20160919000004, 1.0.dev20160920000001, 1.0.dev20160922000001, 2.0.dev2017072501, 2.0.dev2017072601, 2.0.dev2017073101, 2.0.dev2017073101, 2.0.dev2017083101, 2.0.dev2017083101, 2.1rc0, 2.1rc0, 2.1rc1, 2.1rc1, 3.0.0b1, 3.0.0b1, 3.0.0b2, 3.0.0b2, 3.0.0b3, 3.0.0b3, 3.0.0b4, 3.0.0b4, 3.0.0b5, 3.0.0b5, 3.0.0b6, 3.0.0b6, 3.0.0b7, 3.0.0b7
There are incompatible versions in the resolved dependencies:
  graphene-django (from -r /tmp/pipenvcczdc6ayrequirements/pipenv-eg1jqra7-constraints.txt (line 3))
  graphene-django>=3.0.0b1 (from django-graphql-jwt==0.3.2->-r /tmp/pipenvcczdc6ayrequirements/pipenv-eg1jqra7-constraints.txt (line 5))

运行后我没有看到什么不兼容的地方pipenv graph (after pipenv install --skip-lock)因为它返回这个:

django-cors-headers==3.7.0
  - Django [required: >=2.2, installed: 3.2.3]
    - asgiref [required: >=3.3.2,<4, installed: 3.3.4]
      - typing-extensions [required: Any, installed: 3.10.0.0]
    - pytz [required: Any, installed: 2021.1]
    - sqlparse [required: >=0.2.2, installed: 0.4.1]
django-graphql-jwt==0.3.2
  - Django [required: >=1.11, installed: 3.2.3]
    - asgiref [required: >=3.3.2,<4, installed: 3.3.4]
      - typing-extensions [required: Any, installed: 3.10.0.0]
    - pytz [required: Any, installed: 2021.1]
    - sqlparse [required: >=0.2.2, installed: 0.4.1]
  - graphene-django [required: >=3.0.0b1, installed: 3.0.0b7]
    - Django [required: >=2.2, installed: 3.2.3]
      - asgiref [required: >=3.3.2,<4, installed: 3.3.4]
        - typing-extensions [required: Any, installed: 3.10.0.0]
      - pytz [required: Any, installed: 2021.1]
      - sqlparse [required: >=0.2.2, installed: 0.4.1]
    - graphene [required: >=3.0.0b5,<4, installed: 3.0b7]
      - aniso8601 [required: >=8,<9, installed: 8.1.1]
      - graphql-core [required: >=3.1.2,<4, installed: 3.1.5]
      - graphql-relay [required: >=3.0,<4, installed: 3.1.0]
        - graphql-core [required: >=3.1, installed: 3.1.5]
        - typing-extensions [required: >=3.7,<4, installed: 3.10.0.0]
    - graphql-core [required: >=3.1.0,<4, installed: 3.1.5]
    - promise [required: >=2.1, installed: 2.3]
      - six [required: Any, installed: 1.16.0]
    - text-unidecode [required: Any, installed: 1.3]
  - PyJWT [required: >=2,<3, installed: 2.1.0]
Rx==1.6.1
singledispatch==3.6.1
  - six [required: Any, installed: 1.16.0]

似乎每个版本都在版本范围内正确安装,包括它抱怨的 graphene-django [必需:>=3.0.0b1,已安装:3.0.0b7]。

为什么会发生这个错误?

pip3 list返回:

Package             Version
------------------- --------
aniso8601           8.1.1
asgiref             3.3.4
Django              3.2.3
django-cors-headers 3.7.0
django-graphql-jwt  0.3.2
graphene            3.0b7
graphene-django     3.0.0b7
graphql-core        3.1.5
graphql-relay       3.1.0
pip                 21.1.1
promise             2.3
PyJWT               2.1.0
pytz                2021.1
Rx                  1.6.1
setuptools          56.0.0
singledispatch      3.6.1
six                 1.16.0
sqlparse            0.4.1
text-unidecode      1.3
typing-extensions   3.10.0.0
wheel               0.36.2

管道文件:

[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
django = "*"
django-graphql-jwt = "*"
pyjwt = "1.7.1"
django-cors-headers = "*"
graphene-django = "*"

[requires]
python_version = "3.7"

[dev-packages]

我已经尝试了很多方法来尝试解决这个问题,但不知道从这里该去哪里。我想在我的树莓派上部署这个 python、graphql 和 React 项目,但如果我什至无法让它运行,我想我不能。我正在尝试在我的树莓派(运行 raspbian)上运行它,问题出在后端 python 应用程序上。

任何帮助,任何事情都将非常感激。我是 python 初学者。


您以某种方式设法安装了测试版(使用--pre然后从 Pipfile 中删除该选项,例如或直接在虚拟环境中使用 pip)。

现在,因为django-graphql-jwt不符合语义版本控制,他们决定依赖主要版本,在补丁版本中预发布¯\_(ツ)_/¯ .

从0.3.1版本开始django-graphql-jtw依赖于取决于>=2.5.1 https://github.com/flavors/django-graphql-jwt/blob/dd08b8d54b9c102c6cdd2b39df5eb4acc258fbe3/setup.py#L40,您的测试版仍然会匹配,但没有--pre标志锁定将会失败,因为最高的非 beta 版本是 2.5.1。这就是所显示的冲突(但输出不是很清楚)。

应该解决该问题的决议是:

pipenv uninstall django-graphql-jwt django-graphene graphene graphql
# followed by:
pipenv install 'django-graphql-jwt<0.3.2'
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

已解析的依赖项中存在不兼容的版本 的相关文章

随机推荐

  • 进行 RPC 调用时出现序列化异常

    我创建了一个非常基本的应用程序 我只有一个服务类和一个相应的异步类 该类仅包含 Java 类型 没有自定义类 但我仍然遇到序列化异常 我的服务类看起来像这样 public interface MyService extends Remote
  • u-boot 可以支持多个以太网端口吗?

    我想从多个以太网端口执行 ping 操作 u boot 仅支持单个以太网端口是否存在固有限制 u boot 可以支持多个以太网端口吗 是的 在最近版本的 U Boot 中 至少可以追溯到 2012 10 突出的代码是eth current
  • GLSL、Opengl 中的视差贴图问题

    我的视差贴图给出了错误的结果 我不知道出了什么问题 影子 放错了地方 光线从观察者处射向立方体 Shader程序 基于dhpoware com vert varying vec3 lightDir varying vec3 viewDir
  • 从图库(SD 卡)中选择图像用于我的应用程序时发生异常... java.lang.OutOfMemoryError:位图大小超出 VM 预算

    我正在使用 Android 在我的应用程序上选择图像 我不知道为什么 有时我会遇到例外 我认为我总是选择超过 400 或 500 kb 的图像 但我不确定 为什么 因为当我选择 100 kb 的小图像时 我没有遇到异常 而当我获取高 KB
  • 为什么 Bootstrap 尝试在 Edge 中加载 LESS 文件?

    我有一个使用 Twitter Bootstrap 的网页 它在 Chrome Firefox 和 Safari 中运行良好 然而 当我尝试在 Windows 10 上的 Edge 中查看它时 收到一堆 403 错误 指出它无法从 Boots
  • 有什么方法可以将 HTML 添加到 Xamarin.Forms 页面中吗?

    我希望能够将一些 HTML 添加到 Xamarin Forms 页面中 这可能吗 是否可以将其添加为标签的一部分 如果您想要完整的 html 支持 那么 Xamarin formsWebView将会是一个不错的选择 但如果你想要一些基本的格
  • Angular 2,设置默认值以选择选项

    我尝试为选项添加默认值 它就像一种占位符 我使用这个方法 https stackoverflow com questions 5805059 how do i make a placeholder for a select box去做吧 在
  • 混合 C++ ABI 以针对遗留库进行构建

    情况是这样的 我有一个使用最新 GCC 4 3 3 的 C 代码库 但我需要链接到使用 GCC 3 2 3 构建的旧库 该库没有可用的新版本 我不能没有它 而且它是闭源的 因此无法重建 这似乎造成了一个问题 因为 GCC 4 3 3 和 3
  • 用 PHP 编译带有多个附件的电子邮件

    我需要从 PHP 发送一封包含多个图像附件的电子邮件 我目前有一个使用两个硬编码图像的测试设置 我用所有必要的标题编译电子邮件并将其发送出去 但是 当我收到它时 它只显示第一张图片作为附件 第二张图片似乎被忽略了 使用 Groupwise
  • 将关联数组变成类似于 Eloquent 查询集合的集合

    我有一个正在接收 API 数据的类 我想将所有响应包装到一个集合类中 因此 我从 API 调用接收数据 将其转换为普通的关联 php 数组 并使用collect helper 我本以为它能像 Eloquent 一样工作 你可以将键引用为集合
  • 如何使用 Selenium Web 驱动程序上传文件/处理窗口

    我正在尝试自动化一个场景 在该场景中我必须上传文档 但我无法处理上传文件一旦我单击网络应用程序上的 选择文件 按钮 就会出现窗口 我使用的是 C 语言和 Chrome 浏览器 我的 C 测试用例 Test Description JAVA
  • ARM 模板部署不会删除旧管道

    我正在使用 ARM 模板部署我的数据工厂 当我删除管道时 旧版本不会从目标环境中删除 重命名也会发生同样的情况 我的目标环境包含一个具有旧名称的管道和一个具有新名称的管道 如何删除带有 ARM 模板部署的旧管道 注意 我只想删除数据工厂内的
  • Mathematica 中的树数据结构

    我主要使用mathematica 作为数学工作台和编写相对较小的临时程序 然而 我正在设计一个系统 打算在 Mathematica 中编程 我需要将数据存储在树中 并搜索和遍历树 尽管我知道如何实现树 但我更喜欢标准的 经过测试的代码 我在
  • Spring:正确设置@ComponentScan

    我为我的设置进行了以下设置Spring Application Context Configuration public class RmiContext Bean public RmiProxyFactoryBean service Rm
  • 可空类型“int”的默认值是多少? (包括问号)?

    在C 中 类型的类实例变量的默认值是多少int 例如 在下面的代码中 什么值将MyNullableInt如果从未明确分配的话有吗 class MyClass public int MyNullableInt 看来答案几乎肯定是null or
  • 无法删除表用户,因为其他对象依赖于它

    我想将我的表删除到数据库中 但是 当我使用时 例如 DROP TABLE if exists users 我收到这条消息 cannot drop table users because other objects depend on it
  • Laravel 路由不调用控制器的功能

    我在页面 刀片 中有一个表单 它重定向到一个路由 该路由要调用控制器中的函数 但它甚至不会进入函数内部 因为即使是简单的 dd 不能被执行 在途中 如果我更改为 Route post edit profile function Reques
  • 无法使用自定义样式编织为 pdf

    尝试使用自定义 mystyles sty 文件从 RStudio 编织为 pdf 这曾经工作正常 但现在我已经升级到 RStudio 1 044 我收到错误 Example title Test output pdf document in
  • 分析(可能受 I/O 限制)进程以减少延迟

    我想提高大型应用程序中特定方法的性能 目标是改善延迟 特定功能所花费的挂钟时间 而不是 必然 系统负载 要求 由于我预计大部分延迟是由 I O 造成的 因此请考虑等待 阻塞所花费的时间 换句话说 查看挂钟时间而不是 CPU 时间 由于该程序
  • 已解析的依赖项中存在不兼容的版本

    我正在尝试运行我的 python 项目 该项目似乎在我的 Mac 上运行良好 在 pycharm 中最好 不太好 但可以在 VSCode 中运行 但在 VSCode 中的树莓派上运行得很糟糕 每当我运行pipenv shell然后一个pip