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

相关推荐
Lucky092843 分钟前
codex 安装前置软件
linux·运维·macos
vortex517 小时前
从Conda到UV:Python项目依赖管理的现代演进
python·conda·uv
EXI-小洲17 小时前
MacOS 环境下 IntelliJ IDEA 的 Maven 配置指南
macos·maven·intellij-idea
aspirant-complete1 天前
MAC(Apple Silicon)嵌入式基于Clion(stm32CubeMX)环境搭建
stm32·macos
CODER03042 天前
Anaconda和Mamba创建环境管理包常用命令合集
python·深度学习·conda·虚拟环境·mamba·常用命令大全
EXI-小洲2 天前
MacOS IDEA将本地项目代码上传至SVN空仓库
macos·svn·intellij-idea
weixin_531670893 天前
Interlude起来:久坐提醒软件为什么需要登录?有没有完全本地运行的Mac休息提醒软件?
人工智能·macos·swift
coding4u3 天前
Mac 多桌面(Spaces)的正确用法:你的屏幕可以大三倍
macos·docker·计算机外设·文件管理·策略模式
New_Horizons6663 天前
Vscode终端激活Conda虚拟环境
ide·vscode·conda
️学习的小王4 天前
Anaconda国内镜像配置与conda常用命令
ide·经验分享·python·conda