在进行深度学习模型搭建,遇到版本不匹配,下载numpy不适配M1芯片的问题,经过尝试下面的放大亲测有效
激活自己创建的虚拟环境下输入以下指令
卸载原有的版本
pip uninstall spicy
pip uninstall numpy
第一步:由于我们需要自己编译numpy,所以先下载cython和pybind11
pip install cython pybind11
第二部:安装numpy
pip install --no-binary :all: --no-use-pep517 numpy
接下来安装scipy
pip install --pre -i https://pypi.anaconda.org/scipy-wheels-nightly/simple scipy
如果遇到错误没办法解决,可以按照这篇文章尝试一下:
https://zhuanlan.zhihu.com/p/524020004https://zhuanlan.zhihu.com/p/524020004