Tensorflow+python3 常见运行问题及其解决方法
2018-02-27 16:56
615 查看
本文地址:http://blog.csdn.net/shanglianlm/article/details/79390615
解决:tensorflow只支持cuda9.0,下载9.0并安装。
from tensorflow.examples.tutorials.mnist import input_data
1 SyntaxError: Missing parentheses in call to ‘print’
解决:python2支持 print “xxxx” ,python3需要使用print(“xxx”)2 SyntaxError: multiple statements found while compiling a single statement
解决:多行代码直接在IDLE中编译,是每行都要回车的,或者新建一个py文件来运行。3 ImportError: Could not find ‘cudart64_90.dll’.
ImportError: Could not find ‘cudart64_90.dll’. TensorFlow requires that this DLL be installed in a directory that is named in your %PATH% environment variable. Download and install CUDA 9.0 from this URL: https://developer.nvidia.com/cuda-toolkit解决:tensorflow只支持cuda9.0,下载9.0并安装。
4 ImportError: No module named ‘utils’
解决:pip install utils5 NameError: name ‘xrange’ is not defined
解决:Python3中xrange改为range6 ImportError: No module named ‘input_data’
解决:解决:下载input_data或者使用tensorflow自带的input_datafrom tensorflow.examples.tutorials.mnist import input_data
7
解决:相关文章推荐
- python selenium运行,打包exe常见问题解决方法
- 在Windows上安装Python+MySQL 的常见问题及解决方法
- 使用Apache Axis部署 Web服务时的常见问题及其解决方法
- 使用Axis部署Web服务时的常见问题及其解决方法(转)
- 使用Apache Axis部署 Web服务时的常见问题及其解决方法(转)
- 使用Apache Axis部署 Web服务时的常见问题及其解决方法
- subversion(SVN)常见问题及其解决方法
- 测试管理常见问题及其解决方法
- 使用Axis部署Web服务时的常见问题及其解决方法(转)
- 安装WRF常见问题及其解决方法:
- 在Windows上安装Python2.6+MySQL 的常见问题及解决方法
- 常见系统问题及其解决方法
- subversion(SVN)常见问题及其解决方法
- python常见编码问题解决方法
- 使用Apache Axis部署 Web服务时的常见问题及其解决方法
- 使用Apache Axis部署 Web服务时的常见问题及其解决方法
- sqlite3 jdbc、c接口、python接口处理中文时遇到的问题及其解决方法
- 使用Apache Axis部署 Web服务时的常见问题及其解决方法(IBM 官方文档)
- subversion(SVN)常见问题及其解决方法 .