解决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

相关推荐
Web3&Basketball15 小时前
Meta Muse 816B 实测:两台 Mac 本地跑通
macos·大模型·mac·本地部署·moe·显存优化·meta muse
DevLoom_16 小时前
macOS 27 升级翻车怎么降级?不用终端,2 种方案实测回退旧系统
macos·macos27·mac系统降级·macos安装盘·mac使用技巧
向着光芒的女孩21 小时前
【Mac】腾讯视频会议在Mac电脑屏幕共享失败解决方案
macos
あ-2 天前
mac dbeaver安装后显示数据包损坏
macos
钱栈up2 天前
从 macOS 切回 Windows,我用 5 个免费工具把 80% 操作习惯搬了回来
windows·macos·策略模式
9144062322 天前
mac Git 账户切换问题
git·macos
铁锚2 天前
清理macos系统DS_Store文件的sh脚本
macos
benjiangliu2 天前
恩培趣味计算机视觉-01-conda环境和Python库
开发语言·python·conda
Hello_Pyhx2 天前
CrossPaste 跨系统剪贴板配置:按发现、配对、同步逐层排查
macos·电脑
king13598745503 天前
LFM2.5-24B-A2B Mac 本地部署:内存估算、GGUF/MLX 与 Python 预检脚本
人工智能·macos