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

相关推荐
Aurora-silas9 分钟前
Conda 操作指南
conda
杂货铺的小掌柜6 小时前
MAC版IDEA常用快捷键
java·macos·intellij-idea
@Luminescence9 小时前
conda指令汇总及入门(持续更新ing)
python·conda
WoY202010 小时前
conda修改镜像源遇到的问题:defaults(默认镜像源)清不干净导致创建环境失败
linux·python·conda
江下枫1 天前
macOS 内置反恶意软件三板斧
macos
昵称已被吞噬~‘(*@﹏@*)’~1 天前
【强化学习】MacOS (M1芯片)上最新版本 MuJoCo 通用安装教程(最简洁),PS:不是 mujoco_py 的老版本
python·macos·机器学习·强化学习·mujoco
charlie1145141911 天前
快速备份与恢复 Conda 环境
linux·开发语言·windows·深度学习·机器学习·conda·环境配置
小锋学长生活大爆炸1 天前
【教程】MacOS绕过Apple Develop ID获取麦克风权限
macos·swift
TESmart碲视1 天前
如何设置双屏KVM切换器(Win+Mac双屏双系统共享一套键鼠):手把手详细指南
macos·计算机外设·mst·kvm切换器·tesmart·双屏kvm切换器·tesmart碲视
2501_915106321 天前
iOS开发中CPU功耗监控的实现与工具使用
android·macos·ios·小程序·uni-app·cocoa·iphone