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

相关推荐
周小董3 小时前
[1379]mac安装nvm
macos
bossjuemfc6 小时前
不记得文件名时,Mac 上的搜索还能怎么做?
macos
2501_915909066 小时前
Windows 打开 Xcode 工程,编译调试 Xcode 项目并和 Mac 同事协作
ide·windows·vscode·macos·ios·个人开发·xcode
请为小H留灯15 小时前
Mac 常用操作与维护技巧
macos·电脑·清理电脑·常用技巧
hantmac1 天前
不记得文件名时,Mac 上的搜索还能怎么做?
人工智能·macos
SoulRoar.1 天前
WSL2 + Conda 环境下MinerU 4.x GPU 服务部署与 systemd 常驻指南
conda·wsl·文档解析·mineru
这是谁的博客?1 天前
AI 加速器 RTL 数字系统设计深度解析:从 MAC 阵列 Verilog 实现到时序收敛与时钟功耗的芯片落地全链路
人工智能·macos·ai·verilog·数字ic设计·ai芯片·rtl
slacker-kian1 天前
M 系列 Mac 清除顽固的 CorpLink
macos·corplink·m系列
kk_net88991 天前
FSNotes:macOS 和 iOS 上的开源笔记管理器
笔记·其他·macos·ios
zhangfeng11332 天前
com.apple.quarantine 并不是乱码,而是 macOS Gatekeeper 给下载文件自动打上的“隔离属性
macos·策略模式