python 安装 opencv-python 卡住(Running setup.py bdist_wheel for opencv-python ... )

问题:

pip3 install opence-python 会在Running setup.py bdist_wheel for opencv-python ... 卡住。现象如下:

pip3 install opencv-python
Collecting opencv-python
  Using cached https://files.pythonhosted.org/packages/c4/e2/27a153e27b98410cf5a871096a8baf98dd642e6685d3ebe7abd9edc8d51a/opencv-python-4.5.5.62.tar.gz
Collecting numpy>=1.13.3 (from opencv-python)
  Using cached https://files.pythonhosted.org/packages/51/60/3f0fe5b7675a461d96b9d6729beecd3532565743278a9c3fe6dd09697fa7/numpy-1.19.5.zip
Building wheels for collected packages: opencv-python, numpy
  Running setup.py bdist_wheel for opencv-python ...

解决方法:

pip3 install --upgrade pip
Collecting pip
  Downloading https://files.pythonhosted.org/packages/a4/6d/6463d49a933f547439d6b5b98b46af8742cc03ae83543e4d7688c2420f8b/pip-21.3.1-py3-none-any.whl (1.7MB)
    100% |################################| 1.7MB 196kB/s 
Installing collected packages: pip
  Found existing installation: pip 9.0.1
    Not uninstalling pip at /usr/lib/python3/dist-packages, outside environment /usr
Successfully installed pip-21.3.1
root@localhost:/home/share/CNStream/python/samples# pip install opencv-python
Collecting opencv-python
  Downloading opencv_python-4.5.5.62-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (39.0 MB)
     |################################| 39.0 MB 58 kB/s             
Collecting numpy>=1.13.3
  Downloading numpy-1.19.5-cp36-cp36m-manylinux2014_aarch64.whl (12.4 MB)
     |################################| 12.4 MB 532 kB/s            
Installing collected packages: numpy, opencv-python
Successfully installed numpy-1.19.5 opencv-python-4.5.5.62
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv

你可能感兴趣的:(python,opencv,人工智能)