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

相关推荐
碎_浪1 小时前
Mac 壁纸被 MDM 锁住?我做了个 2MB 的开源方案
macos·开源·swift
逆向编程3 小时前
AI编程CLI两种配置方案(macOS专用)
macos·ai编程
沐禾安信3 小时前
开会来不及记录?Mac 录屏方法收好
macos·音视频·电脑录屏
ITKEY_13 小时前
macOS brew 安装的nginx 文件在哪里?
运维·nginx·macos
大E帝国子民114 小时前
MacOS 安装Seismic Unix
服务器·macos·unix
z***刺20 小时前
VMware安装macOS安装教程(附安装包)2025超详细下载安装教程
其他·macos
ReaF_star20 小时前
【工具】把 eDiary 改造成了“云日记本”:两台 Mac 同步笔记的折腾记录
macos·效率工具·文件同步·icloud drive·ediary·mac 自动化
狂热开发者1 天前
用 Typeoff 把会后口述整理成 Markdown 决策记录
人工智能·windows·macos·ios·安卓
ofoxcoding1 天前
Codex Computer Use 完整指南:AI 自动操控 Mac 与 Windows 桌面实战详解
人工智能·windows·macos·ai
孫治AllenSun1 天前
【RocketMQ】Mac安装
macos·rocketmq