ImportError: DLL load failed importing spacy

时间:2017-08-04 13:05:25

标签: python windows spacy

I'm trying to import spaCy in python (in Windows), but with no luck so far. I installed a virtualenv and with both pip and Anaconda spacy. No problems with installing the package, but when I import spaCy (in a Jupyter Notebook) I get the following error:

[in] import spacy [out] [...] ImportError: DLL load failed: The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log or use the command-line sxstrace.exe tool for more detail.

When I run the input again the error messages is as follows:

[...] ImportError: cannot import name util

I'm not sure where to look for a solution. I thinking of a problem with version of other packages or maybe even with the Python version.

I'm currently using Python 2.7.13.

3 个答案:

答案 0 :(得分:0)

This is a known issue and can be resolved following those links :

https://github.com/explosion/spaCy/issues/1199 & https://github.com/kbenoit/spacyr/issues/19

In a nutshell, it doesn't work because Visual C++ is not installed, and it uses the msvcrt90.dll that ships with Anaconda.

答案 1 :(得分:0)

我需要做的两件事就是让spaCy工作:

  
      
  1. 安装VC2008 Redist(64位)我使用此链接:>   http://www.microsoft.com/download/en/details.aspx?id=20922

  2.   
  3. 当我安装模型(我使用Anaconda)时,请确保我以管理员身份运行提示

  4.   

最后你可能想尝试使用Anaconda。 像我的魅力一样工作

答案 2 :(得分:0)

如果您不想使用anaconda,则对我而言,安装最新的Visual C ++ Redistributable(vc_redist.x64.exe)可以正常工作。

https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads