在搭建cuda + Anaconda + tensorflow的开发环境时,在虚拟环境中的jupyter notebook启动后无法导入tensorflow。具体解决方案如下:

1、首先在虚拟环境中安装ipython和jupyter,可以用conda安装,也可以用pip安装

pip install ipython
pip install jupyter

2、执行下面的命令(不知道为什么)

ipython kernelspec install-self --user

3、

mkdir -p ~/.ipython/kernels

4、

mv ~/.local/share/jupyter/kernels/python3 ~/.ipython/kernels/<kernels_name>

5、打开kernel.json文件,然后将display_name 后面的内容修改为<kernels_name>

vim ~/.ipython/kernels/<kernels_name>/kernel.json

解决不能再jupyter notebook中使用tensorflow的更多相关文章

  1. jupyter notebook中No module named 'tensorflow'

    当我们在jupyter notebook中运行时可能会遇见没有某个包的情况,如下: ---------------------------------------------------------- ...

  2. 解决在jupyter notebook中遇到的ImportError: matplotlib is required for plotting问题

    昨天学习pandas和matplotlib的过程中, 在jupyter notebook遇到ImportError: matplotlib is required for plotting错误, 以下 ...

  3. jupyter notebook中出现ValueError: signal only works in main thread 报错 即 长时间in[*] 解决办法

    我在jupyter notebook中新建了一个基于py3.6的kernel用来进行tensorflow学习 但是在jupyter notebook中建立该kernel时,右上角总是显示 服务正在启动 ...

  4. windows10 下安装tensorflow 并且在jupyter notebook 上使用tensorflow

    一.安装jupyter notebook并配置环境 首先建议大家安装anaconda,最新版本请到官网下载(点击下载连接),没错,直接点击下载python3.6版本的(当然选择做自己电脑相应的位数,我 ...

  5. 【动手学深度学习】Jupyter notebook中 import mxnet出错

    问题描述 打开d2l-zh目录,使用jupyter notebook打开文件运行,import mxnet 出现无法导入mxnet模块的问题, 但是命令行运行是可以导入mxnet模块的. 原因: 激活 ...

  6. linux中jupyter notebook中切换虚拟环境

    python -m ipykernel install --user --name 虚拟环境名称 --display-name "虚拟环境名称" 然后再打开jupyter note ...

  7. 机器学习:Jupyter Notebook中numpy的使用

    一.Jupyter Notebook的魔法命令 # 模块/方法 + ?或者help(模块/方法):查看模块/方法的解释文档: 1)%run # 机械学习中主要应用两个魔法命令:%run.%timeit ...

  8. (数据科学学习手札64)在jupyter notebook中利用kepler.gl进行空间数据可视化

    一.简介 kepler.gl是由Uber开发的进行空间数据可视化的开源工具,是Uber内部进行空间数据可视化的默认工具,通过其面向Python开放的接口包keplergl,我们可以在jupyter n ...

  9. 非线性函数的最小二乘拟合及在Jupyter notebook中输入公式 [原创]

    突然有个想法,能否通过学习一阶RC电路的阶跃响应得到RC电路的结构特征——时间常数τ(即R*C).回答无疑是肯定的,但问题是怎样通过最小二乘法.正规方程,以更多的采样点数来降低信号采集噪声对τ估计值的 ...

随机推荐

  1. virtualbox中 Kali Linux安装增强功能

    1. 将VBoxLinuxAdditions.run文件copy出来 2. 赋予执行权限 chmod +x VBoxLinuxAdditions.run 3. 安装 ./VBoxLinuxAdditi ...

  2. Promise是Monad吗?

    译者按: 近年来,函数式语言的特性都被其它语言学过去了. 原文: Functional Computational Thinking — What is a monad? 译者: Fundebug 为 ...

  3. angularJs学习笔记-入门

    1.angularJs简介 angularJs是一个MV*的javascript框架(Model-View-Whatever,不管是MVVM还是MVC,统归MDV(model drive view)) ...

  4. HTML DOM classList 属性

    页面DOM里的每个节点上都有一个classList对象,程序员可以使用里面的方法新增.删除.修改节点上的CSS类.使用classList,程序员还可以用它来判断某个节点是否被赋予了某个CSS类. 添加 ...

  5. [转]原生JS-查找相邻的元素-siblings方法的实现

    在针对element的操作里,查找附近的元素是一个不可少的过程,比如在实现tab时,其中的一个div增加了“on”class,其他的去除“on”class.如果用jquery的朋友就肯定不会陌生sib ...

  6. python3 os模块

    os模块就是对操作系统进行操作,这个模块提供了一种使用操作系统相关功能的可移植方式.1.系统信息 posix.uname_result(sysname='Linux', nodename='liang ...

  7. 开发Spring过程中几个常见异常(二):Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'a' define

    本异常是小编在运行自己另外一篇博文中的例子时遇到的.(附博文:http://www.cnblogs.com/dudududu/p/8482487.html) 完整异常信息: 警告: Exception ...

  8. Android Studio 之 注释模板

    我们看有的项目的文档,会发现它的注释写的很好看,很规范. 而如果你的代码注释还是在用简单的 // 或者 /**/  ,那就学习一下在Android Studio中如何进行注释模板的设置 首先看下面代码 ...

  9. (后台)jxl.read.biff.BiffException: Unable to recognize OLE stream

    在excel中打开,另存成xls就可以.

  10. Django 自带认证功能auth模块和User对象的基本操作

    一.auth模块 from django.contrib import auth django.contrib.auth中提供了许多方法,这里主要介绍其中的三个: authenticate()    ...