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

相关推荐
游戏开发爱好者822 分钟前
iOS 商店上架全流程解析 从工程准备到审核通过的系统化实践指南
android·macos·ios·小程序·uni-app·cocoa·iphone
慕无言2 小时前
pycharm2024选择conda环境
conda
_可乐无糖3 小时前
活到老学到老之yt-dlp_macos(二)
macos
hai-chu3 小时前
将 Neo4j 安装为 macOS 服务
macos·策略模式·neo4j
远程软件小帮手4 小时前
UU远程上线mac被控!如何远程控制 macOS 设备办公?
游戏·macos·智能手机·电脑
mini_0558 小时前
mac电脑免费使用Typora教程
macos
大牙Adela8 小时前
在Mac上通过Multipass虚拟机中的Ubuntu系统使用Graphviz工具
c语言·qt·ubuntu·macos·multipass·graphviz
z202305088 小时前
Linux之网络子系统-硬件MAC和 phy 的基本组成原理
macos
张志翔的博客12 小时前
如何在 macOS 上切换 Shell:从 Bash 到 Zsh 或其他 Shell
开发语言·macos·bash
2501_941798731 天前
C++高性能音频处理与实时特征提取实战分享:多线程信号处理与低延迟优化经验
ide·macos·xcode