问题描述
在为 python 3.7 安装 tensorflow 后,我尝试导入它,但它给了我一个语法错误.用于安装的命令:sudo -H pip3 install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.10.0-py3-none-any.whl
我认为 tensorflow 还不支持 python3.7.有办法解决吗?
tensorflow import for python 3.7适用于 Anaconda 2019.03 和 Python 3.7 版本
用于 CPU
创建命令:
conda create -n tensorflow_env tensorflow
激活命令:
conda 激活 tensorflow_env
导入命令:
(tensorflow_env) C:\WINDOWS\system32>python
将 tensorflow 导入为 tf
打印(tf.版本)
GPU
创建命令:
conda create -n tensorflow_gpuenv tensorflow-gpu
激活命令:
conda 激活 tensorflow_gpuenv
导入命令:
(tensorflow_gpuenv) C:\WINDOWS\system32>python
将 tensorflow 导入为 tf
打印(tf.版本)
After installing tensorflow for python 3.7, I tried to import it but it gave me a syntax error.the command used for installation : sudo -H pip3 install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.10.0-py3-none-any.whl
I don't think tensorflow has supported python3.7 yet. Is there a way to fix it?
tensorflow import for python 3.7for Anaconda 2019.03 with Python 3.7 version
for CPU
create command:
conda create -n tensorflow_env tensorflow
activate command:
conda activate tensorflow_env
Import command:
(tensorflow_env) C:\WINDOWS\system32>python
for GPU
create command:
conda create -n tensorflow_gpuenv tensorflow-gpu
activate command:
conda activate tensorflow_gpuenv
Import command:
(tensorflow_gpuenv) C:\WINDOWS\system32>python
这篇关于python 3.7的tensorflow导入问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!