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

相关推荐
CyL_Cly18 小时前
localsend安卓手机下载 支持win/mac/ubuntu
android·macos·智能手机
A懿轩A18 小时前
Thaw:让 macOS 菜单栏重获新生的免费全能管理工具,适配 macOS Tache 26.4.1 系统,Ice平替活跃版,解决 Ice 常见报错问题
macos
独隅21 小时前
Anaconda被误删后抢救手册
conda
无效的名字1 天前
mac下安装openclaw
macos
矢志航天的阿洪1 天前
手动安装Gurobi并配置gurobipy到Python环境(Windows/Conda)
windows·python·conda
00后程序员张1 天前
完整指南 iOS App上架到App Store的步骤详解
macos·ios·小程序·uni-app·objective-c·cocoa·iphone
开开心心loky1 天前
[OC 底层] (二)类与对象底层原理
macos·ios·objective-c·cocoa
谢斯2 天前
[esp-idf]macos 环境安装 v6.0
macos
idolao2 天前
ANSYS 2024安装教程 Windows版:License Manager配置+环境变量+Fluent汉化指南
macos
Digitally2 天前
4 种方法将 Mac 联系人同步到 iPhone
macos·cocoa·iphone