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

相关推荐
QH_ShareHub3 小时前
GPU 完整运行过程:驱动、CUDA Toolkit、Conda、Python PyTorch 与 R torch
pytorch·python·conda
Lvan的前端笔记1 天前
python:Mac 系统 uv 完整安装+入门实战
python·macos·uv
pop_xiaoli1 天前
【iOS】离屏渲染
macos·ios·objective-c·cocoa
鸠摩智首席音效师1 天前
如何在 macOS 上创建 React.js 应用程序 ?
前端·react.js·macos
liang89993 天前
Anconda常用命令
linux·人工智能·conda
colman wang3 天前
Git指令(Mac)
git·macos
酷虎软件4 天前
分享链接+视频音频文案提取 API 接口文档
ide·macos·xcode
Hyyy4 天前
为什么 macOS 应用一换 Bundle ID,之前授予的权限就全失效了?
macos·electron
p似笑非笑4 天前
实战验证——把 SDK 塞进一个 macOS 原生 Agent 应用
macos
齐昭王城4 天前
Conda 环境一键搬家:用 conda-pack 打包带走,连网都不用
conda