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

相关推荐
fukai77221 天前
OmniFocus:专为 macOS 与 iOS 打造的专业级任务管理利器
macos·ios
尽兴-1 天前
macOS 系统下 Chrome 浏览器安装 HTTPS 证书完整指南
chrome·macos·https·证书·ssl·pem·crt
专注于大数据技术栈1 天前
Mac本地安装python
macos
珊珊而川1 天前
MAC-SQL:SQL-Llama 的具体训练流程
sql·macos·llama
半夏微凉半夏殇2 天前
cmd控制台出现 系统找不到指定的路径。
conda
2501_915106322 天前
App 怎么上架 iOS?从准备资料到开心上架(Appuploader)免 Mac 上传的完整实战流程指南
android·macos·ios·小程序·uni-app·iphone·webview
青木狐2 天前
关闭 macOS 屏幕捕捉 在录制或截图时显示的「录制指示浮窗」。
macos·mac
LvLuffy2 天前
mac Android Studio配置adb环境(使用adb报错 adb: command not found)
macos·adb·android studio
mpb2 天前
win11安装tensorrt,并适配conda虚拟环境
conda
lzq6032 天前
Python虚拟环境全指南:venv与conda对比与实践
开发语言·python·conda