Anaconda3已经支持在原生的M1 Mac上运行,本篇文章讲介绍如何卸载之前安装好的miniforge3和如何安装新版本的Anaconda3

第一步:打开终端

第二步:Miniforge对你的shell rc文件所做的任何修改。

# Use this first command to see what rc files will be updated
conda init --reverse --dry-run
# Use this next command to take action on the rc files listed above
conda init --reverse

第三步:删除安装Miniforge基本环境的文件夹和所有子文件夹。

CONDA_BASE_ENVIRONMENT=$(conda info --base)
echo The next command will delete all files in ${CONDA_BASE_ENVIRONMENT}
# Warning, the rm command below is irreversible!
# check the output of the echo command above
# To make sure you are deleting the correct directory
rm -rf ${CONDA_BASE_ENVIRONMENT}

第四步:移除任何留下的全局conda配置文件。

echo ${HOME}/.condarc will be removed if it exists
rm -f "${HOME}/.condarc"

到这里miniforge3就已经被彻底卸载了,接下来进入anaconda的官网Anaconda | The World's Most Popular Data Science Platform

选择下图的图标

 建议选择64-Bit (M1) Graphical Installer,即可开始下载

下载完成后安装即可,在pycharm中配置conda的可执行文件路径为/Users/用户名/opt/anaconda3/bin/conda(此处我的用户名是geligeli)

建议Python版本选择3.9 

​​​​​​​

最后附一张M1原生运行的Python进程截图~

​​​​​​​

 

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐