0
votes

I am using Windows10 x64, I have installed spaCy using pip and the installation was successful. pip list gives me spacy (1.9.0) and I can find the spacy folder in C:\Python27\Lib\site-packages.

But whenever I try import spacy at PyCharm, or python -c "import os; import spacy; print(os.path.dirname(spacy.__file__))" at the command line, I get this error:

Traceback (most recent call last):
  File "C:\Python27\lib\site-packages\spacy\__init__.py", line 5, in <module>
    from .deprecated import resolve_model_name
  File "C:\Python27\lib\site-packages\spacy\deprecated.py", line 8, in <module>
    from .cli import download
  File "C:\Python27\lib\site-packages\spacy\cli\__init__.py", line 5, in <module>
    from .train import train, train_config
  File "C:\Python27\lib\site-packages\spacy\cli\train.py", line 8, in <module>
    from ..scorer import Scorer
  File "C:\Python27\lib\site-packages\spacy\scorer.py", line 4, in <module>
    from .gold import tags_to_entities
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.

After some search online, I saw that most of the suggestions have to do with the visual C++ redistributable packages installed. I am not familiar with this, so here is a screenshot of what I have:enter image description here

They are only visible in the control panel. If I go to %windir%/System32 or %windir%/Program Files there's no folder named MS Visual Studio. Could someone help me with this issue? Thank you in advance.

1

1 Answers

0
votes

The Two things I needed to do to get spaCy working were:

  1. Install VC2008 Redist (64Bit) I used this link: http://www.microsoft.com/download/en/details.aspx?id=2092

  2. When I installed the model (I used Anaconda) ensure that I ran the Prompt as Administrator.

Finally you might want to try using Anaconda