解决Mac M1芯片conda创建python3.7环境报错

今天在macbook 上使用 conda 创建 python3.7 环境时报错

shell 复制代码
conda create --name py37 python=3.7

错误如下:

shell 复制代码
Channels:
 - defaults
Platform: osx-arm64
Collecting package metadata (repodata.json): done
Solving environment: failed

PackagesNotFoundError: The following packages are not available from current channels:

  - python=3.7*

Current channels:

  - defaults

To search for alternate channels that may provide the conda package you're
looking for, navigate to

    https://anaconda.org

and use the search bar at the top of the page.

起初我还以为是连接 channel 的问题,换了阿里云等镜像源进行连接,但是仍然没有得到解决。因此,在排除连接 channel 的问题之后,联想到之前 win 下的环境创建没有问题,因此我怀疑与 M1 的 Arm 架构有关,在查找之后找到了模拟x86_64的解决方案。

shell 复制代码
## create empty environment
conda create -n py37

## activate
conda activate py37

## use x86_64 architecture channel(s)
conda config --env --set subdir osx-64

## install python, numpy, etc.
conda install python=3.7

参考:https://stackoverflow.com/questions/70205633/cannot-install-python-3-7-on-osx-arm64

相关推荐
Patrick在香港4 小时前
同一份脚本,mac 正常 Windows 乱码:open() 默认编码实测(附 3.15 终局)
utf-8·windows·python·macos·跨平台·编码·标准库
DevLoom_6 小时前
Mac装NTFS for Mac,不用修改 SIP 安全设置也能正常读写NTFS硬盘
macos·macos 27·mac读写ntfs·ntfs for mac·mac应用
Laurie三省6 小时前
现场版却配上录音室版的歌词?聊聊我给开源 Mac 歌词软件写的多源打分算法
算法·macos·go
David@6 小时前
Mac中cursor怎么检查更新
macos
emo_2b1 天前
Pycharm配置conda解释器时遇到的问题及解决方法
linux·pycharm·conda
Lancker1 天前
没有 Mac 也能上架 iOS:GitHub Actions 全自动构建 + 签名 + TestFlight 送审实录
macos·ios·github
fei_sun2 天前
RIB、FIB、MAC 、ARP 表
服务器·网络·macos
Highcharts.js2 天前
如何在macOS桌面应用集成Highcharts
macos·highcharts·前端可视化·交互图表
zaemyn20202 天前
macOS 上 AccessClient 无法唤起?排查 Python 架构与 Windows App 识别问题
windows·python·macos·远程桌面·accessclient
Είναι η κοπέλα3 天前
llama.cpp 与 GGUF 格式:本地大模型的“裸引擎“
开发语言·人工智能·pytorch·python·conda