Mac M1芯片无法安装Python3.7的conda环境
用conda安装python3.7的环境,出现错误
(base) ➜ CodeAnalysis git:(main) ✗ conda create -n CodeAnalysis3.7 python=3.7 Collecting package metadata (current_repodata.json): done Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source. Collecting package metadata (repodata.json): done Solving environment: failed PackagesNotFoundError: The following packages are not available from current channels: - python=3.7
解决方法:
在Apple Silicon系统上使用3.7的直接替代方法是使用Rosetta模拟x86_64,详情见这篇文章。
https://blog.csdn.net/chenhuan20123/article/details/128209330
## 创建一个空的环境
conda create -n py37
## 启动该环境
conda activate py37
## 使用x86_64 architecture channel(s)
conda config --env --set subdir osx-64
## 安装python3.7之类的操作 install python, numpy, etc. (add more packages here...)
conda install python=3.7