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

相关推荐
战斗强4 小时前
RTX 5090 Grounded-SAM-2 实时 RTSP 跟踪部署指南
python·conda
春波petal1 天前
Mac nvm 永久固定 Node 版本(新开终端自动生效)
macos·nvm
小宋10211 天前
Mina Meeting Assistant 新手极速上手指南
ide·macos·ai·xcode·mina
AI创界者1 天前
ComfyUI v8 极致整合包发布!Win/Mac 双平台完美适配 + 多卡并行加速,开启 AI 绘画新时代
人工智能·macos
最后一支迷迭香1 天前
Mac使用docker下的两个冷知识
macos·docker·容器
你疯了抱抱我1 天前
【Mac】安装并配置HomeBrew;ARM GCC;make;OpenOCD
arm开发·macos
春波petal1 天前
Mac把底部Dock固定在笔记本主屏(自带屏幕),4步搞定
macos
键盘飞行员1 天前
macOS Trae 解决 Codex 插件不显示问题(官方适配版)
macos·编辑器·ai编程
一个人旅程~1 天前
win11中启用经典win10右键菜单和还原默认win11右键菜单如何操作
windows·经验分享·macos·电脑
花伤情犹在1 天前
Mac上 10 分钟快速安装Hermes
macos·ai·agent·hermes