zoukankan      html  css  js  c++  java
  • No module named 'tensorflow.contrib'

    控制台:pip install tensorflow

    发现自己安装过,且版本2.4.1

    搜索发现自己的python3.8版本无对应 tensorflow,故删除3.8版本,下载3.7版本【百度有教程】。

    对应python3.7版本的tensorflow我下载的是1.14.0。其他应该也可,官网有对应表。

    但是速度慢,毕竟使用pip下载。故换镜像下载:

    修改为国内源:
    新版ubuntu要求使用https源,要注意。
    清华:https://pypi.tuna.tsinghua.edu.cn/simple
    阿里云:http://mirrors.aliyun.com/pypi/simple/
    中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
    华中理工大学:http://pypi.hustunique.com/
    山东理工大学:http://pypi.sdutlinux.org/
    豆瓣:http://pypi.douban.com/simple/

    临时使用:
    可以在使用pip的时候加参数 -i https://pypi.tuna.tsinghua.edu.cn/simple
    例如:pip install -i https://pypi.tuna.tsinghua.edu.cn/simple tensorflow==1.14.0,这样就会从清华这边的镜像去安装tensorflow库。

    【注意!!!我看了csdn一个博主的:pip install tensorflow-gpu==1.14.0.好像是这个,反正tensorflow后面有gpu,把我搞惨了,因为我电脑根本没有支持的gpu,只能用cpu的(pip install tensorflow就是用cpu)】

  • 相关阅读:
    Humidex
    Hangover(1.4.1)
    I Think I Need a Houseboat(1.3.1)
    Sum of Consecutive Prime Numbers
    Doubles
    Financial Management
    Nim算法------高僧斗法
    标题:猜灯谜
    银行管理系统
    三种例行程序(procdures,function,traps)的使用
  • 原文地址:https://www.cnblogs.com/whcai/p/14607860.html
Copyright © 2011-2022 走看看