使用anaconda安装tensorflow,opencv3,使其可以运行在jupyter python上

xiaoxiao2021-02-28  84

转载在:http://blog.csdn.net/chenweiqian_zy/article/details/59109596

1.anaconda的安装参照https://www.continuum.io/downloads/进行安装。

例如本人的安装命令为: bash Anaconda2-4.3.0-Linux-x86_64.sh

2.安装jupyter

更新: conda update anaconda

安装: conda install jupyter

3.安装tensorflow

创建tensorflow环境: conda create -n tensorflow python=2.7

激活环境: source activate tensorflow

安装tensorflow: pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.0.0-cp27-none-linux_x86_64.whl

4.安装OpenCV

从激活环境开始,这些步骤中的命令都在tensorflow环境下,直到最后退出环境。

在这之前还添加了清华源,不知道有没有用: conda config --add channels 'https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/'

安装opencv3: conda install -c menpo opencv3=3.2.0

5跑源码过程中出现了问题,还是没有tensorflow和cv2采用以下句子。

安装ipython: conda install ipython

安装jupyter: conda install jupyter

重新安装jupyter的原因是在tensorflow环境下和不在tensorflow环境下,两者是不一样的安装路径的,对于使用有影响。

6别的问题

安装matplotlib: conda install matplotlib

安装Pillow: conda install pillow

7关闭环境: source deactivate tensorflow

转载请注明原文地址: https://www.6miu.com/read-70678.html

最新回复(0)