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

相关推荐
恋猫de小郭4 小时前
Compose Multiplatform 1.10 Interop views 新特性:Overlay 和 Autosizing
android·flutter·macos·kotlin·github·objective-c·cocoa
weixin_421585014 小时前
系统说明用conda新建虚拟环境,以及后续管理,删除,并在pycharm中引用
ide·pycharm·conda
加油_Yeah5 小时前
Mac 科研/论文专用快捷键(Word + LaTeX + Finder) 与文件管理
macos·编辑器·word
ZhangBlossom5 小时前
Freqtrade 新人上手教程(macOS + Docker,无需 docker-compose)
macos·docker·容器
古城小栈5 小时前
Rust 交叉编译:MacOS ====> Linux (musl 静态编译)
linux·macos·rust
2501_915921435 小时前
360移动端性能监控实践QDAS-APM(iOS篇)
android·macos·ios·小程序·uni-app·cocoa·iphone
开开心心_Every1 天前
多端免费远程控制工具:4K流畅同账号直连
游戏·macos·微信·pdf·excel·语音识别·phpstorm
ha_lydms1 天前
在iCloud、Onedrive等云文件夹中开启超级右键菜单
macos·onedrive·icloud·超级右键·better365
我不是稻草人1 天前
Centos共享Mac文件
linux·macos·centos
不知疲倦的仄仄1 天前
HTTP解析/版本变化/TSL
网络协议·tcp/ip·macos