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

相关推荐
狐狸1171 小时前
解决在win10找不到site-packages\torch\lib\shm.dll“ or one of its dependencies 问题
pytorch·conda·pip
Mac技巧大咖2 小时前
Mac误删文件,废纸篓也清了?Mac时光机器仍可恢复找回
macos·mac误删文件
程序员果子4 小时前
零拷贝:程序性能加速的终极奥秘
linux·运维·nginx·macos·缓存·centos
天庭鸡腿哥4 小时前
macOS的功能,在Windows上也能实现
windows·microsoft·macos·visual studio·everything
weixin_462446235 小时前
macOS 安装 git-lfs
git·macos
ModestCoder_5 小时前
Ubuntu 22.04,Isaac Sim 5.1.0 + Isaac Lab 2.3.0 Conda 环境安装指南
linux·ubuntu·conda
摘星编程9 小时前
从云游戏到Mac远程操控:UU远程游戏、办公场景全覆盖
游戏·macos·uu远程
wudl55661 天前
Conda 的使用说明
conda
tobebetter95271 天前
How to use homebrew on mac
macos·homebrew