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

相关推荐
liang89991 天前
Anconda常用命令
linux·人工智能·conda
colman wang1 天前
Git指令(Mac)
git·macos
酷虎软件2 天前
分享链接+视频音频文案提取 API 接口文档
ide·macos·xcode
Hyyy2 天前
为什么 macOS 应用一换 Bundle ID,之前授予的权限就全失效了?
macos·electron
p似笑非笑2 天前
实战验证——把 SDK 塞进一个 macOS 原生 Agent 应用
macos
齐昭王城2 天前
Conda 环境一键搬家:用 conda-pack 打包带走,连网都不用
conda
p似笑非笑2 天前
在Mac上完美配置VSCode的C/C++开发环境(GCC/G++详细教程)
c语言·vscode·macos
韦胖漫谈IT2 天前
Apple M3 Max 与 Apple M5 Max 对比:本地算力的新旧王者之争
网络·人工智能·macos·transformer
greasyfork3 天前
多种数据库管理混乱?Navicat Premium 17 for Mac 统一解决
数据库·mysql·macos·mac
碎_浪3 天前
Mac 壁纸被 MDM 锁住?我做了个 2MB 的开源方案
macos·开源·swift