#创建x86的python3.10的环境(很重要!使用arm版的python3.10安装会报错,见后面)
CONDA_SUBDIR=osx-64 conda create -n py310 python=3.10
#激活环境:
sjwmacn:~ sjw$ conda activate py310
(py310) sjwmacn:~ sjw$ python
Python 3.10.2 | packaged by conda-forge | (main, Feb 1 2022, 19:32:15) [Clang 11.1.0 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()
#安装:
(py310) sjwmacn:~ sjw$ pip install PyQt5 -i https://pypi.tuna.tsinghua.edu.cn/simple
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting PyQt5
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/80/1c/46d8f76e1719a8a00921ab579ed1b908c830d356a7658ec7ceda5d421912/PyQt5-5.15.6-cp36-abi3-macosx_10_13_x86_64.whl (7.0 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.0/7.0 MB 2.7 MB/s eta 0:00:00
Collecting PyQt5-Qt5>=5.15.2
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/62/09/99a222b0360616250fb2e6003a54e43a2a06b0774f0f8d5daafb86a2c375/PyQt5_Qt5-5.
Mac M1 conda安装PyQt5--解决报错:‘sipbuild.api‘ has no attribute ‘prepare_metadata_for_build_wheel‘
最新推荐文章于 2025-10-24 22:45:05 发布
本文介绍了如何在x86架构的Mac系统上通过conda创建并激活Python 3.10环境,并成功安装PyQt5及其依赖,避免了使用ARM版本Python的安装错误。

最低0.47元/天 解锁文章
5453

被折叠的 条评论
为什么被折叠?



