简体   繁体   English

在 Anaconda 中安装 tensorflow-gpu 时出现无法满足的错误

[英]Unsatisfiable error while installing tensorflow-gpu in Anaconda

I have installed Anaconda Python 3.7 in Ubuntu 18.04 and then executed the commands:我已经在 Ubuntu 18.04 中安装了 Anaconda Python 3.7,然后执行了以下命令:

conda update --all
conda install cudnn

Now when I try to install tensorflow-gpu using the command conda install tensorflow-gpu , I get Unsatisfiable error like this:现在,当我尝试使用命令conda install tensorflow-gpu ,出现如下 Unsatisfiable 错误:

UnsatisfiableError: The following specifications were found to be incompatible with each other: UnsatisfiableError:发现以下规范彼此不兼容:

  • pkgs/main/linux-64::_ipyw_jlab_nb_ext_conf==0.1.0=py37_0 -> ipywidgets -> widgetsnbextension[version='>=3.4.0,<3.5.0'] -> notebook[version='>=4.4.1'] -> nbconvert -> bleach pkgs/main/linux-64::_ipyw_jlab_nb_ext_conf==0.1.0=py37_0 -> ipywidgets -> widgetsnbextension[version='>=3.4.0,<3.5.0'] -> notebook[version='>=4.4。 1'] -> nbconvert -> 漂白
  • pkgs/main/linux-64::bleach==3.1.0=py37_0 pkgs/main/linux-64::bleach==3.1.0=py37_0
  • pkgs/main/linux-64::ipywidgets==7.4.2=py37_0 -> widgetsnbextension[version='>=3.4.0,<3.5.0'] -> notebook[version='>=4.4.1'] -> nbconvert -> bleach pkgs/main/linux-64::ipywidgets==7.4.2=py37_0 -> widgetsnbextension[version='>=3.4.0,<3.5.0'] -> notebook[version='>=4.4.1'] -> nbconvert -> 漂白
  • pkgs/main/linux-64::jupyterlab==0.35.5=py37hf63ae98_0 -> jupyterlab_server[version='>=0.2.0,<0.3.0'] -> notebook -> nbconvert -> bleach pkgs/main/linux-64::jupyterlab==0.35.5=py37hf63ae98_0 -> jupyterlab_server[version='>=0.2.0,<0.3.0'] -> notebook -> nbconvert -> 漂白
  • pkgs/main/linux-64::jupyterlab_server==0.2.0=py37_0 -> notebook -> nbconvert -> bleach pkgs/main/linux-64::jupyterlab_server==0.2.0=py37_0 -> notebook -> nbconvert -> 漂白
  • pkgs/main/linux-64::notebook==5.7.8=py37_0 -> nbconvert -> bleach pkgs/main/linux-64::notebook==5.7.8=py37_0 -> nbconvert -> 漂白
  • pkgs/main/linux-64::widgetsnbextension==3.4.2=py37_0 -> notebook[version='>=4.4.1'] -> nbconvert -> bleach pkgs/main/linux-64::widgetsnbextension==3.4.2=py37_0 -> notebook[version='>=4.4.1'] -> nbconvert -> 漂白
  • pkgs/main/noarch::nbconvert==5.5.0=py_0 -> bleach pkgs/main/noarch::nbconvert==5.5.0=py_0 -> 漂白

As multiple important packages are concerned here, I am getting confused what to do.由于这里涉及多个重要的包,我很困惑该怎么做。 I have NVIDIA GTX 1070 Max-Q in my PC, so tensorflow-gpu should work perfectly.我的 PC 中装有 NVIDIA GTX 1070 Max-Q,因此 tensorflow-gpu 应该可以完美运行。

You can install Tensorflow GPU using the below code:您可以使用以下代码安装 Tensorflow GPU:

  1. Create a New Virtual Environment创建新的虚拟环境

    conda create -n tensorflow_gpu pip python=3.6

  2. Activate the Virtual Environment激活虚拟环境

    activate tensorflow_gpu

  3. Install CUDA Toolkit using安装 CUDA Toolkit 使用

    conda install -c anaconda cudatoolkit

  4. Install Tensorflow GPU安装 Tensorflow GPU

    pip install --ignore-installed --upgrade tensorflow-gpu==1.15

For more information, please refer this Tensorflow Blog .有关更多信息,请参阅此Tensorflow 博客

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM