anaconda环境下安装tensorflow 无法使用matplotlib

官网安装方式 

1 安装anaconda

2

$ conda create -n tensorflow pip python=2.7 
3
$ source activate tensorflow
4
(tensorflow)$ pip install --ignore-installed --upgrade 
https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.6.0-cp27-none-linux_x86_64.whl

安装后matplotlib包不在tensorflow环境下。import matplotlib.**  as plt 有问题

解决方法:

1  卸载tensorflow   

                  conda  uninstall tensorflow

2  安装tensorflow

           

pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.6.0-cp27-none-linux_x86_64.whl

而且以后的tensorflow 还不用每次激活,即不用输入(source activate tensorflow)。

谢谢美娟同学,献上我的膝盖。

猜你喜欢

转载自blog.csdn.net/zhangyake1989/article/details/79609668