博主遇到一个问题,在anaconda中安装并配置好tensorflow和opencv后,直接输入

jupyter notebook

启动jupyter notebook在jupyter notebook中输入命令,如import tensorflow并不能调用tensorflow的开发包。

原因是:如果此时直接启动jupyter,此时的jupyter是基于整个anaconda的python,而不是对应的tensorflow虚拟环境,因此进入此虚拟环境后需要重新安装jupyter notebook

输入命令:

/bin/bash

./bin/activate

source activate tensorflow

进入虚拟环境以后,输入命令:

conda install jupyter

直到安装包下载完成,在tensorflow目录下就安装了jupyter,此时在tensorflow虚拟环境下,输入命名:

jupyter notebook

此时就可以调用tensorflow和opencv的库,如下图:

在tensorflow中安装并启动jupyter的方法

相关文章:

  • 2021-08-19
  • 2021-10-23
  • 2021-05-09
  • 2021-04-29
  • 2022-02-21
  • 2022-03-06
  • 2021-05-25
  • 2021-09-26
猜你喜欢
  • 2021-06-10
  • 2021-09-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-06
  • 2021-11-04
相关资源
相似解决方案