首页 > 解决方案 > 相同的命令在不同的设备上输出不同的值

问题描述

我有两个 Raspberry Pi 3。当我这样做时

(tfenv)pi@raspberrypi:~ $ pip install opencv-python==

在第一个 Raspberry Pi 上,我得到:

 Collecting opencv-python
Could not find a version that satisfies the requirement opencv-python== 
(from versions: 3.1.0.0, 3.1.0.1, 3.1.0.2, 3.1 .0.3, 3.1.0.5, 3.2.0.6, 3.2.0.7) No matching distribution found for opencv-python==

在第二个 Raspberry Pi 上,我得到:

   Collecting opencv-python
      Could not find a version that satisfies the requirement opencv-python (from versions: )
    No matching distribution found for opencv-python

我怀疑这是由于每个安装的 Raspbian 版本不同而发生的。Raspberry Pi 2 已Strech安装且 Raspberry Pi 2 已安装Jessie 我是正确的还是其他错误?

更新

我用过pip install --verbose opencv-python==,结果如下:

有 pip 的 Rasberry Pi 无法正常工作

 Skipping link https://files.pythonhosted.org/packages/2b/31/cc5cf31258dc2cbb50dd1b046164add33804eab7af036d86aa68d45c7f6c/opencv_python-3.4.1.15-cp36-cp36m-win_amd64.whl#sha256=2cea809afe32cdccf97d66b131afc0fed80076244fb77b68ad9bf016d9cdc261 (from https://pypi.org/simple/opencv-python/); it is not compatible with this Python
  Could not find a version that satisfies the requirement opencv-python== (from versions: )
Cleaning up...
No matching distribution found for opencv-python==
Exception information:
Traceback (most recent call last):
  File "/home/pi/.conda/envs/tfenv/lib/python3.4/site-packages/pip/_internal/basecommand.py", line 228, in main
    status = self.run(options, args)
  File "/home/pi/.conda/envs/tfenv/lib/python3.4/site-packages/pip/_internal/commands/install.py", line 291, in run
    resolver.resolve(requirement_set)
  File "/home/pi/.conda/envs/tfenv/lib/python3.4/site-packages/pip/_internal/resolve.py", line 103, in resolve
    self._resolve_one(requirement_set, req)
  File "/home/pi/.conda/envs/tfenv/lib/python3.4/site-packages/pip/_internal/resolve.py", line 257, in _resolve_one
    abstract_dist = self._get_abstract_dist_for(req_to_install)
  File "/home/pi/.conda/envs/tfenv/lib/python3.4/site-packages/pip/_internal/resolve.py", line 210, in _get_abstract_dist_for
    self.require_hashes
  File "/home/pi/.conda/envs/tfenv/lib/python3.4/site-packages/pip/_internal/operations/prepare.py", line 245, in prepare_linked_requirement
    req.populate_link(finder, upgrade_allowed, require_hashes)
  File "/home/pi/.conda/envs/tfenv/lib/python3.4/site-packages/pip/_internal/req/req_install.py", line 307, in populate_link
    self.link = finder.find_requirement(self, upgrade)
  File "/home/pi/.conda/envs/tfenv/lib/python3.4/site-packages/pip/_internal/index.py", line 533, in find_requirement
    'No matching distribution found for %s' % req
pip._internal.exceptions.DistributionNotFound: No matching distribution found for opencv-python==

具有 pip 正常工作的 Raspberry Pi

标签: pythonopencvraspberry-pipip

解决方案


推荐阅读