Mac M1 conda安装PyQt5--解决报错:‘sipbuild.api‘ has no attribute ‘prepare_metadata_for_build_wheel‘

本文介绍了如何在x86架构的Mac系统上通过conda创建并激活Python 3.10环境,并成功安装PyQt5及其依赖,避免了使用ARM版本Python的安装错误。
#创建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.
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

sjwbcb

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值