【问题标题】:Unable to install spacy with Anaconda无法使用 Anaconda 安装 spacy
【发布时间】:2020-07-02 15:39:32
【问题描述】:

我的 pycharm 显示的错误是这样的:

执行的命令:

C:\Users\Felipe\Anaconda3\Scripts\conda.exe install -p C:/Users/Felipe/Anaconda3/envs/NLP spacy -y

发生错误:

UnsatisfiableError:发现以下规范相互不兼容

命令输出:

Collecting package metadata (current_repodata.json): ...working... done
Solving environment: ...working... failed with initial frozen solve. Retrying with flexible solve.
Solving environment: ...working... failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working... failed with initial frozen solve. Retrying with flexible solve.
Solving environment: ...working... 
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
failed
Building graph of deps:   0%|          | 0/3 [00:00<?, ?it/s]
Examining python=3.8:   0%|          | 0/3 [00:00<?, ?it/s]  
Examining spacy:  33%|###3      | 1/3 [00:00<00:00, 21.35it/s]
Examining @/win-64::__cuda==11.0=0:  67%|######6   | 2/3 [00:01<00:00,  1.95it/s]
Examining @/win-64::__cuda==11.0=0: 100%|##########| 3/3 [00:01<00:00,  2.92it/s]
                                                                                 
Determining conflicts:   0%|          | 0/3 [00:00<?, ?it/s]
Examining conflict for python spacy:   0%|          | 0/3 [00:00<?, ?it/s]
Examining conflict for __cuda:  33%|###3      | 1/3 [00:00<00:00,  5.01it/s]
Examining conflict for __cuda:  67%|######6   | 2/3 [00:00<00:00, 10.02it/s]
                                                                            
UnsatisfiableError: The following specifications were found to be incompatible with each other:
Output in format: Requested package -> Available versionsThe following specifications were found to be incompatible with your CUDA driver:
  - feature:/win-64::__cuda==11.0=0
  - feature:|@/win-64::__cuda==11.0=0
Your installed CUDA driver is: 11.0

我真的需要弄清楚这一点才能继续学习!

【问题讨论】:

    标签: python nlp anaconda spacy


    【解决方案1】:

    要使用 conda 安装最新版本的 spacy(包括针对 python 3.8 的构建),请从 conda-forge 频道安装 spacy:

    conda install -c conda-forge spacy
    

    【讨论】: