为什么Jupyter在通过Conda安装时降级Tensorflow?

时间:2017-08-25 08:02:48

标签: python tensorflow anaconda jupyter conda

我在我的Ubuntu服务器上通过Conda安装了Tensorflow和Jupyter。

为了获得英特尔优化的Python发行版,我使用了intel channel:

ubuntu@ip-172-31-35-247:~$ conda config --add channels intel
ubuntu@ip-172-31-35-247:~$ conda create -n idp intelpython3_core python=3

我先安装Tensorflow:

(idp) ubuntu@ip-172-31-35-247:~$ conda install tensorflow
Fetching package metadata ...........
Solving package specifications: .

Package plan for installation in environment /home/ubuntu/anaconda3/envs/idp:

The following NEW packages will be INSTALLED:

    backports:         1.0-py35_intel_6   intel [intel]
    backports.weakref: 1.0rc1-py35_0           
    bleach:            1.5.0-py35_intel_0 intel [intel]
    html5lib:          0.9999999-py35_0        
    markdown:          2.6.8-py35_0            
    protobuf:          3.2.0-py35_intel_0 intel [intel]
    tensorflow:        1.2.1-py35_0            
    werkzeug:          0.12.2-py35_0           

Proceed ([y]/n)? y

我接下来安装了Jupyter:

(idp) ubuntu@ip-172-31-35-247:~$ conda install jupyter
Fetching package metadata ...........
Solving package specifications: .

Package plan for installation in environment /home/ubuntu/anaconda3/envs/idp:

The following NEW packages will be INSTALLED:

    decorator:          4.0.11-py35_intel_0 intel [intel]
    entrypoints:        0.2.2-py35_intel_2  intel [intel]
    get_terminal_size:  1.0.0-py35_intel_5  intel [intel]
    ipykernel:          4.5.0-py35_intel_9  intel [intel]
    ipython:            5.3.0-py35_intel_0  intel [intel]
    ipython_genutils:   0.2.0-py35_intel_0  intel [intel]
    ipywidgets:         6.0.0-py35_intel_0  intel [intel]
    jinja2:             2.9.5-py35_intel_3  intel [intel]
    jsonschema:         2.5.1-py35_intel_5  intel [intel]
    jupyter:            1.0.0-py35_intel_5  intel [intel]
    jupyter_client:     5.0.0-py35_intel_0  intel [intel]
    jupyter_console:    5.1.0-py35_intel_0  intel [intel]
    jupyter_core:       4.3.0-py35_intel_0  intel [intel]
    libsodium:          1.0.10-intel_6      intel [intel]
    markupsafe:         0.23-py35_intel_6   intel [intel]
    mistune:            0.7.4-py35_intel_0  intel [intel]
    nbconvert:          5.1.1-py35_intel_0  intel [intel]
    nbformat:           4.3.0-py35_intel_0  intel [intel]
    notebook:           5.0.0-py35_intel_0  intel [intel]
    pandocfilters:      1.4.1-py35_intel_0  intel [intel]
    path.py:            10.1-py35_intel_0   intel [intel]
    pexpect:            4.2.1-py35_intel_0  intel [intel]
    pickleshare:        0.7.4-py35_intel_1  intel [intel]
    prompt_toolkit:     1.0.14-py35_intel_0 intel [intel]
    ptyprocess:         0.5.1-py35_intel_5  intel [intel]
    pygments:           2.2.0-py35_intel_0  intel [intel]
    pyzmq:              16.0.2-py35_intel_2 intel [intel]
    simplegeneric:      0.8.1-py35_intel_5  intel [intel]
    terminado:          0.6-py35_intel_6    intel [intel]
    testpath:           0.3-py35_intel_0    intel [intel]
    tornado:            4.4.2-py35_intel_0  intel [intel]
    traitlets:          4.3.2-py35_intel_0  intel [intel]
    wcwidth:            0.1.7-py35_intel_5  intel [intel]
    widgetsnbextension: 2.0.0-py35_0        intel
    zeromq:             4.1.5-intel_0       intel [intel]

The following packages will be SUPERSEDED by a higher-priority channel:

    html5lib:           0.9999999-py35_0          --> 0.999-py35_intel_0 intel [intel]

The following packages will be DOWNGRADED:

    tensorflow:         1.2.1-py35_0              --> 1.1.0-np112py35_0       

为什么Conda降级先前安装的Tensorflow软件包?是否与intel频道有关?

2 个答案:

答案 0 :(得分:0)

我尝试重新创建你的环境,它对我来说很好。 Tensorflow确实没有降级。可能在最新版本中已解决此问题。

您还可以尝试通过Anaconda安装来自Intel Distribution for Python(IDP)的优化TensorFlow库 - 参考Intel Optimized TensorFlow* Installation Guide

答案 1 :(得分:0)

我通过以下方式解决了安装 jupyterlab:

conda install -c conda-forge jupyterlab

就像在官方的 jupyter guide 中一样。就我而言,通过命令 conda install -c anaconda jupyter 安装 jupyter 将我的 tensorflow 安装从 2.5 降级到 2.3,导致 GPU 出现问题。