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

相关推荐
coding4u7 小时前
Mac 外接显示器完全指南:从插上线到调好每个参数
macos·计算机外设·文件管理·显示器·策略模式·quick look扩展
zhyf1197 小时前
(Mac)Homebrew部署Obsidian+Claudian+Excalidraw
macos
chuan.bai7 小时前
Java RAG 实战(第 3 篇):从交互式聊天到多轮上下文
java·人工智能·macos·ai
Chennn__8 小时前
开源项目:Recorder — 本地离线 macOS 录音转文字(通用/课堂/雅思,可选 Ollama)
macos
AUV11078 小时前
录系统声音用什么 Mac 录屏软件:双音源到成片的五层验收
macos
chuan.bai10 小时前
Java RAG 实战专栏导读:从零跑通 Ollama + Qdrant + Spring Boot 知识库
java·人工智能·macos·ai
向阳是我10 小时前
两台 Mac 远程共享屏幕最佳方案:Tailscale + macOS 原生屏幕共享
macos
楷哥爱开发11 小时前
如何在 Windows、macOS 和 Linux 上安装 scikit-learn (sklearn)
linux·windows·macos
Architect_Lee1 天前
mac快速安装mysql
数据库·mysql·macos
User_芊芊君子1 天前
STT + LLM + TTS:用一条流水线搓了个中英双向翻译助手
ide·macos·xcode