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