Anaconda与Cuda 9.0的集成显示不兼容的包错误 [英] Anaconda Integration with Cuda 9.0 shows Incompatible Package Error

查看:821
本文介绍了Anaconda与Cuda 9.0的集成显示不兼容的包错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Windows 10中使用 NVIDIA-SMI:445.75 安装 CUDA 9.0 .

我的 Cuda 9.0 安装成功,如Command-prompt

所示

*(DL) C:\Users\User>nvcc --version    
nvcc: NVIDIA (R) Cuda compiler driver    
Copyright (c) 2005-2017 NVIDIA Corporation    
Built on Fri_Sep__1_21:08:32_Central_Daylight_Time_2017    
**Cuda compilation tools, release **9.0**, V9.0.176***

(1)我下载了cudnn-9.0-windows10-x64-v7.zip,将其提取,然后将其移动到安装了Cuda时创建的折叠中.

(2)在 Anaconda terminal提示符下,
我输入conda install pytorch=1.1.0 torchvision=0.3.0 cudatoolkit=9.0 –c pytorch.

但是,Anaconda提示给出以下错误

**Error messages**    
*Collecting package metadata (current_repodata.json): done    
Solving environment: failed with initial frozen solve. Retrying with flexible solve.    
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.    
Collecting package metadata (repodata.json): done    
Solving environment: failed with initial frozen solve. Retrying with flexible solve.    
Solving environment: |    
Found conflicts! Looking for incompatible packages.    
This can take several minutes.  Press CTRL-C to abort.    
failed    

UnsatisfiableError: The following specifications were found to be incompatible with the existing python installation in your environment:    

Specifications:    

  - pytorch=1.1.0 -> python[version='>=3.5,<3.6.0a0|>=3.6,<3.7.0a0|>=3.7,<3.8.0a0']    
  - torchvision=0.3.0 -> python[version='>=3.5,<3.6.0a0|>=3.6,<3.7.0a0|>=3.7,<3.8.0a0']    

Your python: python=3.8    

如果python位于链的最左侧,那就是您要求的版本.
当python出现在右侧时,表明左侧的内容对于您受其限制的python版本不可用.请注意,除非您明确指定,conda不会将您的python版本更改为其他次要版本.

发现以下规格互不兼容:

Output in format: Requested package -> Available versions    

Package cudatoolkit conflicts for:    

    torchvision=0.3.0 -> cudatoolkit[version='>=10.0,<10.1|>=9.0,<9.1']    
    pytorch=1.1.0 -> cudatoolkit[version='>=10.0,<10.1|>=9.0,<9.1']    
    torchvision=0.3.0 -> pytorch[version='>=1.1.0'] -> cudatoolkit[version='>=10.1,<10.2|>=9.2,<9.3']The following specifications were found to be incompatible with your CUDA driver:    

      - feature:/win-64::__cuda==11.0=0    

    Your installed CUDA driver is: 11.0*    

解决方案

我如下解决了这个问题.

  1. 通过在开始菜单上搜索Anaconda Powershell提示符来打开它.
  2. 然后运行conda install -c anaconda tensorflow-gpu命令.
  3. 可能会要求您接受.

最后在安装列表中列出tensorflow-gpu.

参考: https://anaconda.org/anaconda/tensorflow-gpu

I am trying to install CUDA 9.0 with NVIDIA-SMI: 445.75 in Windows 10.

My Cuda 9.0 installation is successful, as shown from Command-prompt

*(DL) C:\Users\User>nvcc --version    
nvcc: NVIDIA (R) Cuda compiler driver    
Copyright (c) 2005-2017 NVIDIA Corporation    
Built on Fri_Sep__1_21:08:32_Central_Daylight_Time_2017    
**Cuda compilation tools, release **9.0**, V9.0.176***

(1) I downloaded cudnn-9.0-windows10-x64-v7.zip, extracted it, and moved it to the fold, which was created when Cuda was installed.

(2) In the terminal prompt of the Anaconda,
I input conda install pytorch=1.1.0 torchvision=0.3.0 cudatoolkit=9.0 –c pytorch.

However, Anaconda prompt gives the following error

**Error messages**    
*Collecting package metadata (current_repodata.json): done    
Solving environment: failed with initial frozen solve. Retrying with flexible solve.    
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.    
Collecting package metadata (repodata.json): done    
Solving environment: failed with initial frozen solve. Retrying with flexible solve.    
Solving environment: |    
Found conflicts! Looking for incompatible packages.    
This can take several minutes.  Press CTRL-C to abort.    
failed    

UnsatisfiableError: The following specifications were found to be incompatible with the existing python installation in your environment:    

Specifications:    

  - pytorch=1.1.0 -> python[version='>=3.5,<3.6.0a0|>=3.6,<3.7.0a0|>=3.7,<3.8.0a0']    
  - torchvision=0.3.0 -> python[version='>=3.5,<3.6.0a0|>=3.6,<3.7.0a0|>=3.7,<3.8.0a0']    

Your python: python=3.8    

If python is on the left-most side of the chain, that's the version you've asked for.
When python appears to the right, that indicates that the thing on the left is somehow not available for the python version you are constrained to. Note that conda will not change your python version to a different minor version unless you explicitly specify that.

The following specifications were found to be incompatible with each other:

Output in format: Requested package -> Available versions    

Package cudatoolkit conflicts for:    

    torchvision=0.3.0 -> cudatoolkit[version='>=10.0,<10.1|>=9.0,<9.1']    
    pytorch=1.1.0 -> cudatoolkit[version='>=10.0,<10.1|>=9.0,<9.1']    
    torchvision=0.3.0 -> pytorch[version='>=1.1.0'] -> cudatoolkit[version='>=10.1,<10.2|>=9.2,<9.3']The following specifications were found to be incompatible with your CUDA driver:    

      - feature:/win-64::__cuda==11.0=0    

    Your installed CUDA driver is: 11.0*    

解决方案

I got solved this issue as follows.

  1. Open Anaconda Powershell Prompt by searching it on the start menu.
  2. then run conda install -c anaconda tensorflow-gpu command.
  3. it may be asked to your acceptance.

finally tensorflow-gpu listed on the installed list.

Reference: https://anaconda.org/anaconda/tensorflow-gpu

这篇关于Anaconda与Cuda 9.0的集成显示不兼容的包错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆