gpt4 book ai didi

python-3.x - 由于 astroid 版本冲突,使用 pipenv 安装 prospector 失败

转载 作者:行者123 更新时间:2023-12-04 01:06:29 28 4
gpt4 key购买 nike

我正在尝试使用 pipenv 安装 prospector。但是由于astroid中的版本冲突导致安装失败。 Astroid 是 prospector 的子依赖。自 2018 年 7 月 15 日发布 astroid 2.0 以来,此故障开始。在此之前,构建没有提示并成功

管道文件

[[source]]

url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"

[packages]

Flask = "*"

[dev-packages]
prospector = "*"

pipenv install --dev 日志

Pipfile.lock not found, creating...
Locking [dev-packages] dependencies...

Warning: Your dependencies could not be resolved. You likely have a mismatch in your sub-dependencies.
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.
Could not find a version that matches astroid<2.0,>=1.4,>=1.6,>=2.0.0
Tried: 1.0.0, 1.0.1, 1.1.0, 1.1.1, 1.2.0, 1.2.1, 1.3.0, 1.3.0, 1.3.1, 1.3.1, 1.3.2, 1.3.2, 1.3.3, 1.3.3, 1.3.4, 1.3.4, 1.3.5, 1.3.5, 1.3.6, 1.3.6, 1.3.7, 1.3.7, 1.3.8, 1.3.8, 1.4.0, 1.4.0, 1.4.1, 1.4.1, 1.4.2, 1.4.2, 1.4.3, 1.4.3, 1.4.4, 1.4.4, 1.4.5, 1.4.5, 1.4.6, 1.4.6, 1.4.7, 1.4.7, 1.4.8, 1.4.8, 1.4.9, 1.4.9, 1.5.0, 1.5.0, 1.5.1, 1.5.1, 1.5.2, 1.5.2, 1.5.3, 1.5.3, 1.6.0, 1.6.0, 1.6.1, 1.6.1, 1.6.2, 1.6.2, 1.6.3, 1.6.3, 1.6.4, 1.6.4, 1.6.5, 1.6.5, 2.0, 2.0
Skipped pre-versions: 2.0.0.dev0, 2.0.0.dev0, 2.0.0.dev1, 2.0.0.dev1, 2.0.0.dev2, 2.0.0.dev2, 2.0.0.dev3, 2.0.0.dev3, 2.0.0.dev4, 2.0.0.dev4
There are incompatible versions in the resolved dependencies.

在上面的警告中,存在版本限制冲突。 <2.0,>=2.0.0。但是当我检查 pipenv 图时,没有一个依赖项对 astroid 有 >=2.0.0 的限制

pipenv 图

flask-restplus==0.11.0
- aniso8601 [required: >=0.82, installed: 3.0.2]
- Flask [required: >=0.8, installed: 1.0.2]
- click [required: >=5.1, installed: 6.7]
- itsdangerous [required: >=0.24, installed: 0.24]
- Jinja2 [required: >=2.10, installed: 2.10]
- MarkupSafe [required: >=0.23, installed: 1.0]
- Werkzeug [required: >=0.14, installed: 0.14.1]
- jsonschema [required: Any, installed: 2.6.0]
- pytz [required: Any, installed: 2018.5]
- six [required: >=1.3.0, installed: 1.11.0]
gevent==1.3.5
- greenlet [required: >=0.4.13, installed: 0.4.14]
prospector==0.12.11
- dodgy [required: >=0.1.9, installed: 0.1.9]
- mccabe [required: >=0.5.0, installed: 0.6.1]
- pep8-naming [required: >=0.3.3, installed: 0.7.0]
- flake8-polyfill [required: >=1.0.2,<2, installed: 1.0.2]
- flake8 [required: Any, installed: 3.5.0]
- mccabe [required: >=0.6.0,<0.7.0, installed: 0.6.1]
- pycodestyle [required: >=2.0.0,<2.4.0, installed: 2.3.1]
- pyflakes [required: >=1.5.0,<1.7.0, installed: 1.6.0]
- pycodestyle [required: >=2.0.0,<2.4.0, installed: 2.3.1]
- pydocstyle [required: >=2.0.0, installed: 2.1.1]
- six [required: Any, installed: 1.11.0]
- snowballstemmer [required: Any, installed: 1.2.1]
- pyflakes [required: >=0.8.1,<2.0.0, installed: 1.6.0]
- pylint [required: >=1.5.6,<2.0.0, installed: 1.9.2]
- astroid [required: >=1.6,<2.0, installed: 1.6.5]
- lazy-object-proxy [required: Any, installed: 1.3.1]
- six [required: Any, installed: 1.11.0]
- wrapt [required: Any, installed: 1.10.11]
- isort [required: >=4.2.5, installed: 4.3.4]
- mccabe [required: Any, installed: 0.6.1]
- six [required: Any, installed: 1.11.0]
- pylint-common [required: >=0.2.5, installed: 0.2.5]
- pylint [required: >=1.0, installed: 1.9.2]
- astroid [required: >=1.6,<2.0, installed: 1.6.5]
- lazy-object-proxy [required: Any, installed: 1.3.1]
- six [required: Any, installed: 1.11.0]
- wrapt [required: Any, installed: 1.10.11]
- isort [required: >=4.2.5, installed: 4.3.4]
- mccabe [required: Any, installed: 0.6.1]
- six [required: Any, installed: 1.11.0]
- pylint-plugin-utils [required: >=0.2.5, installed: 0.4]
- pylint [required: Any, installed: 1.9.2]
- astroid [required: >=1.6,<2.0, installed: 1.6.5]
- lazy-object-proxy [required: Any, installed: 1.3.1]
- six [required: Any, installed: 1.11.0]
- wrapt [required: Any, installed: 1.10.11]
- isort [required: >=4.2.5, installed: 4.3.4]
- mccabe [required: Any, installed: 0.6.1]
- six [required: Any, installed: 1.11.0]
- pylint-plugin-utils [required: >=0.2.6, installed: 0.4]
- pylint [required: Any, installed: 1.9.2]
- astroid [required: >=1.6,<2.0, installed: 1.6.5]
- lazy-object-proxy [required: Any, installed: 1.3.1]
- six [required: Any, installed: 1.11.0]
- wrapt [required: Any, installed: 1.10.11]
- isort [required: >=4.2.5, installed: 4.3.4]
- mccabe [required: Any, installed: 0.6.1]
- six [required: Any, installed: 1.11.0]
- pyyaml [required: Any, installed: 3.13]
- requirements-detector [required: >=0.4.1, installed: 0.5.2]
- astroid [required: >=1.4, installed: 1.6.5]
- lazy-object-proxy [required: Any, installed: 1.3.1]
- six [required: Any, installed: 1.11.0]
- wrapt [required: Any, installed: 1.10.11]
- setoptconf [required: >=0.2.0, installed: 0.2.0]

感谢任何帮助:)

最佳答案

回答我自己的问题:)

能够通过以下方法找出问题。

即使“pipenv 图”没有提到任何限制 astroid >=2.0.0 的依赖项,如果我执行“pipenv lock --verbose”,它清楚地表明 pylint-plugin-utils 版本 0.4 期望 astroid >=2.0.0

根据我的包,pylint-plugin-utils 应该 >=0.2.6。因此,我在 piffle 中添加了子依赖项,如下所示

[dev-packages]
astroid = "==1.6.5"
pylint-plugin-utils = "==0.2.6"
prospector = "*"

我特别提到了 astroid 版本,因为如果不是,它会安装 2.0 版,而其他一些子包期望它是 <2.0

关于python-3.x - 由于 astroid 版本冲突,使用 pipenv 安装 prospector 失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51395693/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com