tensorflow 安装
tensorflow安装流程个人总结
pip install tensorflow
pip install tensoflow-gpu
镜像:-i https://pypi.tuna.tsinghua.edu.cn/simple 或-i https://pypi.douban.com/simple
使用tensorflow-gpu前先下载CUDA
CUDA下载链接
根据自己电脑的型号进行下载
我使用的Win10 ,所使用CUDA Ver为 10.0
我在安装中遇到的三类问题
问题1
报错:ERROR:root:Internal Python error in the inspect module.
可以参照此文 link 感谢这位大佬的帮助
下载其中的Microsoft VC++即可
问题2
会遇到tf.__version__无法使用的情况
报错: AttributeError: module ‘tensorflow’ has no attribute ‘xxx’
这里pip uninstall tensorflow 再重新pip install 即可
问题3
我在pip install tensorflow-gpu中遇到以下这个情况
报错:ERROR: Could not install packages due to an EnvironmentError: [WinError 5] 拒绝访问。
这里应使用管理员权限 --user
示:pip install --user tensorflow-gpu