Anaconda 和升级到新的 M1 Mac [英] Anaconda and upgrading to new M1 Mac

查看:161
本文介绍了Anaconda 和升级到新的 M1 Mac的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚得到一台新的 M1 mac mini 开发机器,并使用苹果的迁移助手从我的旧 x86 mac 迁移.

I've just got a new M1 mac mini dev machine, and migrated from my old x86 mac using apple's migration assistant.

这样做还将我所有的 conda 环境复制到新机器上(它们都在我的主目录中)

Doing that also copied over all my conda environments to the new machine (they were all in my home directory)

我安装了最新版本的 anaconda 和 anaconda 以及我所有的 python 代码和环境似乎都可以正常工作(这包括一堆轮子模块,特别是 numpy/scipy).

I installed the latest version of anaconda and anaconda plus all my python code and environments seem to work fine (this includes a bunch of wheel modules, notably numpy/scipy).

我在下面的问题上做了一堆谷歌搜索,但在任何地方都找不到任何好的答案 - 所以我想我会问 SO,因为这似乎是其他人会遇到的很常见的情况

  • 有人知道conda forge提供的python/numpy/scipy等M1原生版本的状态吗?
  • 我认为我的环境中用于 python/numpy 等的所有二进制文件都仍然是旧的 x86 版本,因为它们都在我的主目录中的环境中,并且通过仿真运行.那么,您如何着手将这些更改/更新为 M1 arm 本机版本是否/何时可用?

推荐答案

截至 2021 年 7 月的快速更新.

A quick update as of July 2021.

TLDR

  • conda-forge 组有一个 M1 native conda 安装程序这里.
  • 安装很简单 - 运行安装程序,您就可以启动并运行 conda.
  • 这将安装 M1 本机 conda,并且该 conda 的默认环境将默认安装 M1 本机 Python 版本和 M1 本机版本的模块(如果可用).
  • 现在 conda-forge 频道上似乎有适用于大多数常见模块的原生 osx M1 原生轮子.
  • The conda-forge group have a M1 native conda installer here.
  • Installation is simple - run the installer, and you have conda up and running.
  • This will install an M1 native conda, and that conda's default environment will by default install M1 native python versions and M1 native versions of modules (if available).
  • There seem to be native osx M1 native wheels for most common modules now available on the conda-forge channel.

当前状态

似乎 Anaconda 仍然没有原生 M1 版本,Miniconda 也没有....我不明白为什么花了这么长时间,而且似乎仍然没有原生 M1 支持,但这是一个单独的问题.

It seems Anaconda still do not have a native M1 version, nor does Miniconda. ...I can't figure out why it's taken so long and neither still seem to have native M1 support, but that's a separate issue.

替代

但是,正如上面提到的 steff,conda-forge(如 负责维护的组conda-forge 频道) 确实有一个安装程序,适用于他们的 conda 版本,它本身既是原生 M1,也可以设置你的环境来拉取 M1 原生可用的车轮.他们称之为Miniforge.

However, as steff above mentioned, conda-forge (as in the group responsible for maintaining the conda-forge channel) do have a installer for their version of conda that is itself both native M1, and also sets up your environment to pull M1 native wheels where available. This they call Miniforge.

他们的 github 在这里.

Their github is here.

他们的 Miniforge 的各种安装程序(通过直接下载、curl 或自制软件)可以在他们的 github 页面(上图)上找到 - ARM 原生 miniforge 安装程序的直接链接是 这里.

Various installers for their Miniforge (via direct download, curl or homebrew) can be found on their github page (above) - the direct link to the ARM native miniforge installer is here.

快速搜索 conda-forge show 的几乎所有常见模块现在都提供原生 M1 轮子.(寻找支持平台 'osx-arm64` 例如 numpy)

A quick search on conda-forge show's almost all common modules do now have native M1 wheels available. (look for supporting platform 'osx-arm64` eg numpy)

注意事项

我还没有对此进行过广泛的测试,我不确定如果非 M1 车轮可用会发生什么(我相信它会默认下载无拱形版本).

I've not tested this too extensively yet, and I'm not sure exactly what happens if a non-M1 wheel is available (I believe it will default to downloading a no-arch version).

我也不确定/尚未测试是否可以将 M1 车轮与 x86 mac 车轮混合搭配.(我猜这会起作用,但还没有尝试过).

I'm also not sure/haven't tested whether you can mix and match M1 wheels with x86 mac wheels. (I'm guessing this would work, but haven't tried).

我也只使用 conda 的 pip 进行了最少的测试,以及它识别/尝试下载/解析 M1 与 x86 pip 包的能力.

I also have only done minimal testing using the conda's pip, and how well it recognizes/tries to download/resolves M1 vs x86 pip packages.

这篇关于Anaconda 和升级到新的 M1 Mac的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆