在Python环境里下载OpenCV

pip install --upgrade pip
# pip install cmake -i https://pypi.tuna.tsinghua.edu.cn/simple
#  (from versions: 3.4.0.14, 3.4.10.37, 3.4.11.39, 3.4.11.41, 3.4.11.43, 3.4.11.45, 3.4.13.47, 3.4.15.55, 3.4.16.57, 3.4.16.59, 3.4.17.61, 3.4.17.63, 4.3.0.38, 4.4.0.40, 4.4.0.42, 4.4.0.44, 4.4.0.46, 4.5.1.48, 4.5.3.56, 4.5.4.58, 4.5.4.60, 4.5.5.62, 4.5.5.64)
pip install opencv-python -i https://pypi.tuna.tsinghua.edu.cn/simple
(venv) (base) mengmei-mac:pythonProject mengmei$ pip install opencv-python -i https://pypi.tuna.tsinghua.edu.cn/simple
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting opencv-python
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/3c/61/ee4496192ed27f657532fdf0d814b05b9787e7fc5122ed3ca57282bae69c/opencv-python-4.5.5.64.tar.gz (89.9 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting numpy>=1.19.3
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/58/55/6fef1ef16124066b96d5b5cb107c8e0af20b2007b79ba8f7e52ca2e1b2b7/numpy-1.22.3-cp39-cp39-macosx_10_14_x86_64.whl (17.6 MB)
Building wheels for collected packages: opencv-python
  Building wheel for opencv-python (pyproject.toml) ... \

如果在这里等待了一个世纪,最后还是失败了,那么你就直接升级系统吧,是新的软件已经不支持旧的Mac操作系统了。


安装pygame包:

pip install pygame
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容