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

相关推荐
goodmao13 小时前
【macOS】【mouse】设置鼠标大小
macos·计算机外设·鼠标·mouse
Magnum Lehar13 小时前
macos信息采集器appledataharvester-3
macos·网络安全·系统安全
川川菜鸟15 小时前
Claude Code 安装与配置完整指南(Mac)
macos
WarmSword16 小时前
mac上用cursor/vscode调试root权限进程
c++·ide·vscode·macos·mac
Magnum Lehar17 小时前
macos的信息采集器appledataHarvester-2
macos·网络安全·系统安全
echo-niuben18 小时前
macOS 端已如何正常安装并配置XcodeBuildMCP ?
macos
刘某某.19 小时前
Mac上缺失宋体字体,只有宋体-简
macos
没事儿写两篇19 小时前
Anaconda 的开源替代软件 Miniforge
开源·conda·miniconda·miniforge
Tom·Ge20 小时前
在macOS上安装OpenClaw并实现Chrome网站自动化测试
chrome·macos·策略模式
次旅行的库21 小时前
不能将windows本地虚拟环境打包到实验室服务器
linux·windows·conda