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

相关推荐
FreeBuf_11 小时前
朝鲜黑客组织“传染性面试“瞄准macOS:新型“DriverFixer“窃密工具浮出水面
macos·面试·职场和发展
Zfox_18 小时前
无缝穿越系统边界:节点小宝4.0如何让我的Mac/iOS像访问本地盘一样操控Windows
windows·macos·ios·节点小宝
MicJordan20 小时前
macos安装Claude提示command not found
macos
坠金20 小时前
mac电脑网络卡顿解决方法
macos
写点啥呢1 天前
MacOS远程桌面报错0x207解决方法
macos
CrankZ1 天前
幕译 1.7--本地字幕生成与翻译--支持macOS,Windows
macos·whisper
ashcn20011 天前
autohotkey模拟mac中英文切换和ESC切成英文(适配vim)
macos·autohotkey
大猫熊猫1 天前
【ios】xcode运行项目时报错 Showing All Errors Only Framework ‘Pods_Runner‘ not found
macos·ios·xcode
weixin_462446231 天前
【原创实践】mac手动安装 wget
macos·wget
FreeBuf_1 天前
认证噩梦:新型MacSync窃密木马绕过Gatekeeper劫持Mac设备
macos