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

相关推荐
JEECG低代码平台4 小时前
开源 Mac 开关栏 QuickSwitch v1.1.2 发布:一键切换静音、蓝牙、深色模式
macos·开源软件
FungLeo4 小时前
Swift macOS 游戏开发实战|空当接龙 17|Swift 游戏测试,验证规则、交互与存档边界
软件测试·macos·swift·游戏开发·回归测试
枣把儿5 小时前
剪贴板、截图标注、长截图、自动运镜录屏,我全塞进一个不到 3MB 的免费开源软件里
前端·macos·swiftui
码云数智-园园5 小时前
SwiftUI 与 UIKit 混合开发常见坑和适配方案
macos·objective-c·cocoa
FungLeo7 小时前
Swift macOS 游戏开发实战|空当接龙 16|Swift 游戏计时,处理暂停、自然日与时区
macos·swift·时区·计时器·日期处理
FungLeo1 天前
Swift macOS 游戏开发实战|空当接龙 11|使用 Swift Actor 实现自动存档与坏档保护
macos·swift·数据持久化·actor·swift并发
sean9081 天前
macOS Outlook(或者是Office系列?) App 打开时自动启动 Microsoft Autoupdate 处理
microsoft·macos·outlook·自动更新
FungLeo1 天前
Swift macOS 游戏开发实战|空当接龙 09|SwiftUI 与 AppKit 动画,如何分离显示与游戏状态
macos·swiftui·动画·swift·appkit
FungLeo1 天前
Swift macOS 游戏开发实战|空当接龙 13|SwiftUI 与 AppKit 应用的多语言切换与 RTL 布局
macos·国际化·swiftui·swift·rtl
AirDroid_cn1 天前
下棋也有“光影魔术”:macOS Sequoia国际象棋棋盘随环境光自动变质感
macos