导入 TensorFlow 时出现 ModuleNotFoundError

时间:2021-02-06 16:32:48

标签: python tensorflow jupyter-notebook pycharm anaconda

我尝试将 TensorFlow(通过 pip 下载)导入 Jupyter notebook 或 PyCharm ce,但两者都出现 ModuleNotFound 错误。此外,我之前安装了 Anaconda 并删除了该应用程序,但我认为文件仍然存在,当我尝试在终端中写入“conda”时,它说找不到命令。

1 个答案:

答案 0 :(得分:0)

这些步骤将帮助您在 Anaconda 中安装 Tensorflow

1. Download the anaconda package from https://www.anaconda.com/download/

or 

curl -O https://repo.anaconda.com/archive/Anaconda3-x-x-x-x.sh

2. Verify the Data Integrity of the Installer  (optional)
sha256sum Anaconda3-x-x-x-x.sh

3. Run the Anaconda Script
bash Anaconda3-x-x-x-x.sh

4. Activate Installation
source ~/.bashrc

5. Test Installation
conda list

6. Set Up Anaconda Environments
conda create --name tf python=3

7. Activate the new Environment
source activate tf

8. Install Tensorflow
tf$pip install tensorflow