当前位置:   article > 正文

No matching distribution found for opencv-python

no matching distribution found for opencv-python

No matching distribution found for opencv-python

1. opencv-python 安装失败

sudo pip3 install opencv-python

strong@strong-System-Product-Name:~$ sudo pip3 install opencv-python
The directory '/home/strong/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/strong/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting opencv-python
  Could not find a version that satisfies the requirement opencv-python (from versions: )
No matching distribution found for opencv-python
You are using pip version 8.0.2, however version 18.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8

2. 更新 pip 版本

You are using pip version 8.0.2, however version 18.0 is available.

strong@strong-System-Product-Name:~$ sudo apt-get update
Hit:1 http://mirrors.aliyun.com/ubuntu xenial InRelease
Get:2 https://packages.microsoft.com/repos/azure-cli wheezy InRelease [2,808 B]
Ign:2 https://packages.microsoft.com/repos/azure-cli wheezy InRelease          
Hit:3 http://ppa.launchpad.net/hzwhuang/ss-qt5/ubuntu xenial InRelease        
Fetched 2,808 B in 1s (2,322 B/s)                  
Reading package lists... Done
W: GPG error: https://packages.microsoft.com/repos/azure-cli wheezy InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY EB3E94ADBE1229CF
W: The repository 'https://packages.microsoft.com/repos/azure-cli wheezy InRelease' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.


strong@strong-System-Product-Name:~$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
  libboost-atomic-dev libboost-chrono-dev libboost-context-dev
  libboost-coroutine-dev libboost-date-time-dev libboost-exception-dev
  libboost-filesystem-dev libboost-graph-dev libboost-graph-parallel-dev
  libboost-iostreams-dev libboost-locale-dev libboost-log-dev
  libboost-math-dev libboost-program-options-dev libboost-python-dev
  libboost-random-dev libboost-regex-dev libboost-serialization-dev
  libboost-signals-dev libboost-system-dev libboost-test-dev
  libboost-thread-dev libboost-timer-dev libboost-tools-dev libboost-wave-dev
  libpython3-dev libpython3.5-dev python3-dev python3-wheel python3.5-dev
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


strong@strong-System-Product-Name:~$ sudo pip3 install opencv-python
The directory '/home/strong/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/strong/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting opencv-python
  Could not find a version that satisfies the requirement opencv-python (from versions: )
No matching distribution found for opencv-python
You are using pip version 8.0.2, however version 18.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.


strong@strong-System-Product-Name:~$ pip install --upgrade pip
Cache entry deserialization failed, entry ignored
Collecting pip
  Cache entry deserialization failed, entry ignored
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/5f/25/e52d3f31441505a5f3af41213346e5b6c221c9e086a166f3703d2ddaf940/pip-18.0-py2.py3-none-any.whl (1.3MB)
    100% |████████████████████████████████| 1.3MB 257kB/s 
Installing collected packages: pip
  Found existing installation: pip 8.0.2
    Uninstalling pip-8.0.2:
Exception:
Traceback (most recent call last):
  File "/usr/lib/python3.5/shutil.py", line 538, in move
    os.rename(src, real_dst)
PermissionError: [Errno 13] Permission denied: '/usr/bin/pip3' -> '/tmp/pip-n2_hzhv1-uninstall/usr/bin/pip3'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/pip-8.0.2-py3.5.egg/pip/basecommand.py", line 209, in main
    status = self.run(options, args)
  File "/usr/local/lib/python3.5/dist-packages/pip-8.0.2-py3.5.egg/pip/commands/install.py", line 317, in run
    prefix=options.prefix_path,
  File "/usr/local/lib/python3.5/dist-packages/pip-8.0.2-py3.5.egg/pip/req/req_set.py", line 725, in install
    requirement.uninstall(auto_confirm=True)
  File "/usr/local/lib/python3.5/dist-packages/pip-8.0.2-py3.5.egg/pip/req/req_install.py", line 752, in uninstall
    paths_to_remove.remove(auto_confirm)
  File "/usr/local/lib/python3.5/dist-packages/pip-8.0.2-py3.5.egg/pip/req/req_uninstall.py", line 115, in remove
    renames(path, new_path)
  File "/usr/local/lib/python3.5/dist-packages/pip-8.0.2-py3.5.egg/pip/utils/__init__.py", line 266, in renames
    shutil.move(old, new)
  File "/usr/lib/python3.5/shutil.py", line 553, in move
    os.unlink(src)
PermissionError: [Errno 13] Permission denied: '/usr/bin/pip3'
You are using pip version 8.0.2, however version 18.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.


strong@strong-System-Product-Name:~$ sudo pip install --upgrade pip
The directory '/home/strong/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/strong/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting pip
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/5f/25/e52d3f31441505a5f3af41213346e5b6c221c9e086a166f3703d2ddaf940/pip-18.0-py2.py3-none-any.whl (1.3MB)
    100% |████████████████████████████████| 1.3MB 562kB/s 
Installing collected packages: pip
  Found existing installation: pip 8.0.2
    Uninstalling pip-8.0.2:
      Successfully uninstalled pip-8.0.2
Successfully installed pip-18.0
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90

3. opencv-python 安装成功

sudo pip install opencv-python
sudo pip3 install opencv-python

strong@strong-System-Product-Name:~$ sudo pip3 install opencv-python
The directory '/home/strong/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/strong/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting opencv-python
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/6a/c8/32023281fc27b787f966a33b8ae946b0f3491062e8b1f1e48029f0269a0d/opencv_python-3.4.2.17-cp35-cp35m-manylinux1_x86_64.whl (25.0MB)
    100% |████████████████████████████████| 25.0MB 2.6MB/s 
Requirement already satisfied: numpy>=1.11.1 in ./.local/lib/python3.5/site-packages (from opencv-python) (1.13.3)
Installing collected packages: opencv-python
Successfully installed opencv-python-3.4.2.17
strong@strong-System-Product-Name:~$ 
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11

References

https://yongqiang.blog.csdn.net/

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/从前慢现在也慢/article/detail/90407
推荐阅读
相关标签
  

闽ICP备14008679号