我刚买了一台新的Macbook M1,很难在里面使用Jupyter笔记本。
到目前为止,我遵循的步骤如下:
1. Installed Homebrew
2. Installed pyenv
3. brew install miniforge
4. conda create -n new_env python=3.8.11
5. conda activate new_env
6. conda install Ipython
7. conda install ipykernel
8. conda install jupyter
9. pip install tensorflow然后,我从这个虚拟环境中打开Jupyter notebook,并尝试import tensorflow,它给了我错误“内核似乎已经死了。它将自动重新启动”。
这一切为什么要发生?我有什么遗漏的吗?有没有人能帮我一下?
发布于 2021-08-31 03:22:12
目前Apple Silicon没有稳定的tensorflow (2021-09-30)。如果你能够通过pip install tensorflow安装,那么你就是在amd64上使用conda,在Rosetta2上翻译。
访问https://github.com/conda-forge/miniforge并下载适用于arm64版本的Miniforge3-MacOSX-arm64.sh,然后重新安装miniforge。
bash Miniforge3-MacOSX-arm64.sh做
# Delete and create your environment from scratch
conda create -n new_env python=3.8
conda activate new_env
conda install -c apple tensorflow-deps
pip install tensorflow-macos
pip install tensorflow-metal
conda install -c conda-forge -y pandas jupyter然后你就可以毫无问题地运行tensorflow了。
来源:https://caffeinedev.medium.com/how-to-install-tensorflow-on-m1-mac-8e9b91d93706
https://stackoverflow.com/questions/68903962
复制相似问题