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

相关推荐
这儿有一堆花4 小时前
视频文件的技术逻辑解析
windows·macos
啦啦右一7 小时前
杂货铺 | 复现Github项目,用Conda解决旧版requirements.txt的TensorFlow冲突
github·conda·tensorflow
Sheffi667 小时前
iOS Crash 本质与捕获修复方案
macos·ios·cocoa
喵霓7 小时前
mac—android-platform-tools介绍
android·macos
malajisi017 小时前
鸿蒙PC开发笔记一:HarmonyOS PC 命令行适配指南(Mac 版)
笔记·macos·harmonyos·harmony·鸿蒙pc·harmony pc
喵霓7 小时前
mac——安装wget
macos
bioinforiver8 小时前
蛋白质设计(六)— — 三剑合璧,mac如何安装ProteinMPNN、Alphafold2
macos
Charles Shan8 小时前
Mac上的linux虚拟机踩坑日记
linux·macos
老菜鸟YDZ8 小时前
二十多年前的苹果电脑Power Mac G4 MDD音箱修复
macos·苹果电脑·power mac g4·音箱修复
2301_766536058 小时前
MacOS操作杂谈
macos