我正在尝试在Anaconda Navigator中运行Tensorflow。我将Tensorflow安装到一个名为tf的新环境中。下面是我的代码:
import tensorflow as tf
from tensorflow.keras import layers
from tensorflow.keras.layers import Activation, Dense错误消息是unable to import tensorflow和No module named tensorflow
发布于 2021-06-11 18:02:31
按照以下步骤在Anaconda环境中安装。
#Set Up Anaconda Environments
conda create --name tf_env python=3.7
#Activate the new Environment
source activate tf_env
#Install tensorflow
tf_env$pip install tensorflow
#Verify installation
tf_env$python
>import tensorflow as tf
>tf.__version__https://stackoverflow.com/questions/65683569
复制相似问题