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

相关推荐
菜鸟歪歪歪38 分钟前
idea中增加api中转站教程(Mac,Window通用)
macos·intellij-idea
Dxy123931021613 小时前
如何使用Conda国内源安装虚拟环境(保姆级全平台教程)
conda
码上暴富14 小时前
Conda从入门到精通的环境管理实战
conda
小石潭记丶19 小时前
本地mac创建秘钥,然后远程登录Linux服务器
linux·服务器·macos
xin_yao_xin1 天前
Conda 环境的 CUDA PATH 配置指南
开发语言·python·conda·cuda
小呀小叮当~1 天前
OpenAI Codex 桌面版(Windows / macOS)体验分享:AI 编程效率再次提升
人工智能·windows·macos
myenjoy_11 天前
I2S 音频与数字音频接口详解
macos·音视频·xcode
星野爱8952 天前
崩坏星穹铁道4.4版本即将前瞻!Mac畅玩PC端开荒新版本
macos
funnycoffee1232 天前
lacp报文占多少字节?报文的目的mac
网络·网络协议·macos
itwangyang5202 天前
Claude Code macOS 安装完整指南:Homebrew、原生脚本与常见问题解决
macos