您的位置:首页 > 文旅 > 旅游 > 解决Mac M1芯片conda创建python3.7环境报错

解决Mac M1芯片conda创建python3.7环境报错

2024/10/9 18:19:28 来源:https://blog.csdn.net/m0_52316372/article/details/142032453  浏览:    关键词:解决Mac M1芯片conda创建python3.7环境报错

今天在macbook 上使用 conda 创建 python3.7 环境时报错

conda create --name py37 python=3.7

错误如下:

Channels:- defaults
Platform: osx-arm64
Collecting package metadata (repodata.json): done
Solving environment: failedPackagesNotFoundError: The following packages are not available from current channels:- python=3.7*Current channels:- defaultsTo search for alternate channels that may provide the conda package you're
looking for, navigate tohttps://anaconda.organd use the search bar at the top of the page.

起初我还以为是连接 channel 的问题,换了阿里云等镜像源进行连接,但是仍然没有得到解决。因此,在排除连接 channel 的问题之后,联想到之前 win 下的环境创建没有问题,因此我怀疑与 M1 的 Arm 架构有关,在查找之后找到了模拟x86_64的解决方案。

## 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

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com