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

相关推荐
CocoaKier4 小时前
如何安装旧版的MacOS系统?
macos·ios·mac
GeofferyLibrom7 小时前
# Mac 平台 Chiaki-ng 配置指南: Base64 ID 获取
macos·base64·chiaki-ng·npsso·psnawp
GeofferyLibrom7 小时前
PS5 自动化挂机指南:基于 Mac + Chiaki-ng 视觉识别——龙信2自动挂机实战
运维·macos·自动化
月月如常7 小时前
Typora 粘贴图片时 PicGo 弹窗的解决方案
macos·typora·picgo
andyweike7 小时前
CGRect
macos·objective-c·cocoa
疯狂敲代码的老刘8 小时前
DigUp:2.8千星开源Mac语义搜索,Google DeepMind模型本机运行找遍所有文件
macos
anthonyzhu9 小时前
xcode27适配iOS27多窗口生成机制处理的问题
macos·objective-c·cocoa
TheLittleBoy9 小时前
iOS 27支持的设备列表
macos·ios·cocoa·ios 27
李永吉11 小时前
mac软件安装包pkg公证装订处理去掉安全拦截弹窗
macos
朝阳5811 天前
Mac 上找窗口,可以先按这几种情况来
macos