zoukankan      html  css  js  c++  java
  • window10安装tensorflow2

    一、gpu检查

    查看是否安装cuda:nvcc -V 

     然后放弃:度娘后发现CUDA8.0 不支持tensorflow 1.5,故需要降低版本。(也可提升CUDA版本,不过需要注意CUDA与cudnn版本的对应,以及是否与电脑的GPU兼容,否则很容易入坑。cuda8对应 cudnn6,cuda9 对应cudnn7.)

    二、创建虚拟环境:

    conda create -n tf2 python=3.6

    三、更新pip

    pip install pip -U # 升级 pip 到最新的版本 (>=10.0.0) 后进行配置
    pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple   //使用清华源

    四、安装tensoflow2.0

    安装方法一:

    pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn tensorflow==2.0

    报错:

    原因:(setuptools 版本太旧 , wrapt 不能卸载)

    强制安装:pip install --ignore-installed -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn tensorflow==2.0

    安装方法二:(我没安装成功,会报错)

    python -m pip install --user --upgrade pip

    pip install tensorflow==2.0.0-alpha0

    执行import tensorflow报错:ModuleNotFoundError: No module named 'numpy.core._multiarray_umath'

    解决:pip install --user --upgrade numpy

    执行import tensorflow报错:TypeError: __init__() got an unexpected keyword argument 'serialized_options'

     

  • 相关阅读:
    C#轻量级企业事务
    扩展方法
    JDK Environment Variable And Change default JDK
    AsyncTask简单获取网络图片的例子
    mysql基础
    Oracle基础操作
    java 中 colkection集合、迭代器、增强for、泛型
    centos7 解决 mysql_connect()不支持请检查mysql模块是否正确加载
    python 操作MySQL避坑1064
    面向对象学习
  • 原文地址:https://www.cnblogs.com/Lee-yl/p/12549717.html
Copyright © 2011-2022 走看看