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

相关推荐
缘友一世1 小时前
mac系统安装最新(截止2024.9.13)Oracle JDK操作记录
java·macos·oracle
AUV11071 小时前
CleanClip for Mac 剪切板 粘贴工具 历史记录 安装(保姆级教程,新手小白轻松上手)
macos·mac·剪贴板·clipboard·剪贴板增强·复制历史·最强应用
鸿萌数据安全1 小时前
鸿萌数据恢复服务:Mac 文件系统是如何影响 Mac 数据恢复的?
macos·mac数据恢复
七七r13 小时前
【Mac】系统环境配置
macos
chen_zn9517 小时前
conda常用指令
conda
sysin.org18 小时前
OpenCore Legacy Patcher 2.0.0 发布,83 款不受支持的 Mac 机型将能运行最新的 macOS Sequoia
macos·opencore·olp
程序者王大川1 天前
【GO开发】MacOS上搭建GO的基础环境-Hello World
开发语言·后端·macos·golang·go
yanling20231 天前
Parallels Desktop 20破解版(Mac虚拟机) v20.0.0 for Mac 最新商业版(支持M系列)
macos·虚拟机·pd
kkk2358131 天前
成功激活mac idea 记录
java·macos·intellij-idea
仙剑魔尊重楼1 天前
CleanMyMac X 4.15.6正式版 mac直装破解版
macos·电脑·cleanmymac·cleanmymacx