我正在尝试使用pipenv安装探矿器。但是由于astroid版本冲突导致安装失败。 Astroid是探矿者的子依赖项。自2018年7月15日发布astroid 2.0以来,此故障就开始了。在此之前,该版本没有抱怨并成功
Pipfile
[[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图时,没有任何依赖项具有> = 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]
感谢任何帮助:)
答案 0 :(得分:1)
回答我自己的问题:)
可以通过以下方法找出问题所在。
即使“ pipenv图”没有提及任何限制astroid> = 2.0.0的依赖项,但如果我执行“ pipenv lock --verbose”,则它清楚地表明pylint-plugin-utils版本0.4希望astroid能够是> = 2.0.0
根据我的软件包,pylint-plugin-utils应该> = 0.2.6。因此,我在下面的子句中添加了子依赖项
[dev-packages]
astroid = "==1.6.5"
pylint-plugin-utils = "==0.2.6"
prospector = "*"
我特别提到了astroid版本,因为如果没有安装,那么它将安装2.0版,而其他一些子软件包希望它是<2.0