最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

【未解决】Mac本地中pipenv警告:Could not find a version that matches botocore

Mac crifan 6722浏览 0评论

折腾:

【已解决】Flask的gunicorn中多进程多worker如何共享数据或单实例

期间,去Mac本地中pipenv中安装其他的库:

<code>pipenv install greenlet
</code>

结果最后报之前就见过的警告:

<code>Locking [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 botocore&lt;1.11.0,&lt;1.12.0,&lt;2.0.0,==1.10.84,&gt;=1.10.77,&gt;=1.11.3,&gt;=1.3.0
Tried: 0.4.1, 0.4.2, 。。。。。。 1.11.3
Skipped pre-versions: 1.0.0a1, 1.0.0a2, 1.0.0a3, 1.0.0b1, 1.0.0b2, 1.0.0b3, 1.0.0rc1, 1.0.0rc1
There are incompatible versions in the resolved dependencies.
</code>

很明显是版本不匹配

pipenv Could not find a version that matches botocore

“Could not find a version that matches”, but acceptable version listed · Issue #1802 · pypa/pipenv

<code>➜  naturlingRobotDemoServer git:(master) ✗ pipenv-resolver --clear
using sources: [{'url': 'https://pypi.tuna.tsinghua.edu.cn/simple', 'verify_ssl': True, 'name': 'pypi'}]
RESULTS:
[]
</code>

再去加上缺的库:

<code>➜  xxx git:(master) ✗ pipenv-resolver --clear  botocore 
using sources: [{'url': 'https://pypi.tuna.tsinghua.edu.cn/simple', 'verify_ssl': True, 'name': 'pypi'}]
RESULTS:
[{"name": "botocore", "version": "1.11.4", "hashes": ["sha256:284f25a67fa3470314ce78a53e57df8591549652ae31dce1097acefec195b694", "sha256:8d0b64bfa0043b93cd779c8bf960bb0a8d763b6b803310b6bd49c62f564cc2af"]}, {"name": "jmespath", "version": "0.9.3", "hashes": ["sha256:6a81d4c9aa62caf061cb517b4d9ad1dd300374cd4706997aff9cd6aedd61fc64", "sha256:f11b4461f425740a1d908e9a3f7365c3d2e569f6ca68a2ff8bc5bcd9676edd63"]}, {"name": "urllib3", "version": "1.23", "hashes": ["sha256:a68ac5e15e76e7e5dd2b8f94007233e01effe3e50e8daddf69acfd81cb686baf", "sha256:b5725a0bd4ba422ab0e66e89e030c806576753ea3ee08554382c14e685d117b5"], "markers": "python_version &gt;= '2.6' and python_version != '3.3.*' and python_version != '3.1.*' and python_version &lt; '4' and python_version != '3.0.*' and python_version != '3.2.*'"}, {"name": "docutils", "version": "0.14", "hashes": ["sha256:02aec4bd92ab067f6ff27a38a38a41173bf01bed8f89157768c1573f53e474a6", "sha256:51e64ef2ebfb29cae1faa133b3710143496eca21c530f3f71424d77687764274", "sha256:7a4bd47eaf6596e1295ecb11361139febe29b084a87bf005bf899f9a42edc3c6"]}, {"name": "six", "version": "1.11.0", "hashes": ["sha256:70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9", "sha256:832dc0e10feb1aa2c68dcc57dbb658f1c7e65b9b61af69048abc87a2db00a0eb"]}, {"name": "python-dateutil", "version": "2.7.3", "hashes": ["sha256:1adb80e7a782c12e52ef9a8182bebeb73f1d7e24e374397af06fb4956c8dc5c0", "sha256:e27001de32f627c22380a688bcc43ce83504a7bc5da472209b4c70f02829f0b8"], "markers": "python_version &gt;= '2.7'"}]
➜  xx git:(master) ✗ 
</code>

重新卸载后,重新安装试试:

<code>➜  xxx git:(master) ✗ pipenv uninstall botocore
Un-installing botocore...
Uninstalling botocore-1.11.1:
  Successfully uninstalled botocore-1.11.1

No package botocore to remove from Pipfile.
Locking [dev-packages] dependencies...
Locking [packages] dependencies...
^C
Aborted!
</code>

卸载都卡死了。

<code>➜  xx git:(master) ✗ pipenv --skip-lock uninstall botocore
Error: no such option: --skip-lock
</code>

算了,去安装:

<code>➜  xxx git:(master) ✗ pipenv install --pre --skip-lock botocore
Courtesy Notice: Pipenv found itself running within a virtual environment, so it will automatically use that environment, instead of creating its own for any project. You can set PIPENV_IGNORE_VIRTUALENVS=1 to force pipenv to ignore that environment and create its own instead.
Installing botocore...
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting botocore
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/63/4e/02ae5a3b77017707cb689f77c3227c93c70396aaa9e57469278731571f92/botocore-1.11.4-py2.py3-none-any.whl (4.6MB)
Requirement already satisfied: urllib3&lt;1.24,&gt;=1.20 in /Users/crifan/.local/share/virtualenvs/naturlingRobotDemoServer-SCpLPEyZ/lib/python3.6/site-packages (from botocore) (1.23)
Requirement already satisfied: python-dateutil&lt;3.0.0,&gt;=2.1; python_version &gt;= "2.7" in /Users/crifan/.local/share/virtualenvs/naturlingRobotDemoServer-SCpLPEyZ/lib/python3.6/site-packages (from botocore) (2.7.3)
Requirement already satisfied: jmespath&lt;1.0.0,&gt;=0.7.1 in /Users/crifan/.local/share/virtualenvs/naturlingRobotDemoServer-SCpLPEyZ/lib/python3.6/site-packages (from botocore) (0.9.3)
Requirement already satisfied: docutils&gt;=0.10 in /Users/crifan/.local/share/virtualenvs/naturlingRobotDemoServer-SCpLPEyZ/lib/python3.6/site-packages (from botocore) (0.14)
Requirement already satisfied: six&gt;=1.5 in /Users/crifan/.local/share/virtualenvs/naturlingRobotDemoServer-SCpLPEyZ/lib/python3.6/site-packages (from python-dateutil&lt;3.0.0,&gt;=2.1; python_version &gt;= "2.7"-&gt;botocore) (1.11.0)
Installing collected packages: botocore
Successfully installed botocore-1.11.4

Adding botocore to Pipfile's [packages]...
Installing dependencies from Pipfile...
  🐍   ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 22/22 — 00:00:13
</code>

然后再去lock,过了好半天才结束:

<code>➜  xx git:(master) ✗ pipenv lock  
Locking [dev-packages] dependencies...
Locking [packages] dependencies...
Updated Pipfile.lock (4f544f)!
</code>

貌似问题已解决。

“Could not find a version that matches coloredlogs” when creating lockfile · Issue #871 · pypa/pipenv

Sub-dependencies missing and “Could not find a version that matches” errors · Issue #1703 · pypa/pipenv

又去让清除cache

<code>$ rm -fr ~/Library/caches/pip
$ rm -fr ~/Library/caches/pipenv
</code>

【总结】

此处Pipenv install时,会提示警告:

Could not find a version that matches botocore

原因:

之前不知道何故,安装出来的botocore的版本有不一致,不匹配的地方。

后来通过下面的步骤,(貌似)解决了问题:

<code>pipenv uninstall botocore
pipenv install --pre --skip-lock botocore
pipenv lock
</code>

有待后续确认是否真正解决问题:

后续pipenv install xxx

后,是否还会出现这个:

Could not find a version that matches botocore

转载请注明:在路上 » 【未解决】Mac本地中pipenv警告:Could not find a version that matches botocore

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
82 queries in 0.180 seconds, using 22.21MB memory