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

相关推荐
00后程序员张1 天前
Windows 下怎么生成 AppStoreInfo.plist?不依赖 Xcode 的方法
ide·macos·ios·小程序·uni-app·iphone·xcode
boldiy1 天前
如何在MAC电脑中实现自动切换windows快捷键
windows·macos
在路上@Amos1 天前
conda 安装
conda
张3蜂1 天前
Flutter macOS 安装文档
flutter·macos
Nan-h11 天前
Mac 剪贴板工具选型:先看工作流,再看 Maccy、Raycast、Paste 和 uPaste
macos·贴图
Rabbit_QL1 天前
【find的用法】macOS/Linux 下高效查找文件
linux·macos
大熊猫侯佩2 天前
升级到 macOS26.5 后看视频会自动息屏的解决
macos·操作系统
磊 子2 天前
C++ IO 流
macos·objective-c·cocoa
real_haha2 天前
我做了一个仅有 1.3 MB 的 macOS 原生 AI 助手:AskNow
人工智能·macos
神秘剑客_CN2 天前
ubuntu26.04音频转srt字幕
ubuntu·conda·whisperx