【问题标题】:ModuleNotFoundError when importing TensorFlow导入 TensorFlow 时出现 ModuleNotFoundError
【发布时间】:2021-05-10 17:40:30
【问题描述】:

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

【问题讨论】:

标签: python tensorflow jupyter-notebook pycharm anaconda


【解决方案1】:

这些步骤将帮助您在 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

【讨论】:

    猜你喜欢
    • 2020-03-21
    • 2021-05-09
    • 2021-11-19
    • 2020-09-19
    • 2021-07-29
    • 2021-01-26
    • 2018-03-20
    • 1970-01-01
    • 2020-06-28
    相关资源
    最近更新 更多