dbmi-pitt / SocialMediaDataScience

Data Science module - text analytics, Natural Language Processing, and Machine Learning on Social Media (twitter) data
24 stars 50 forks source link

Part 3: Error in spacy.load('en') #3

Closed sanyabt closed 6 years ago

sanyabt commented 6 years ago

I am trying to run the code in Part 3 of the Jupyter Notebooks, however the spacy module is not loading in JupyterHub. I have confirmed that the Python version is 3.6. I get the error when trying to run this line

import spacy nlp = spacy.load('en')

Attached screenshot of error.

Is anyone else getting this too?

screen shot 2018-10-20 at 8 11 37 pm
sanyabt commented 6 years ago

Seems like its an error due to not loading the module. Fixed it by using my system and installing spacy and the module separately. pip install spacy && python -m spacy download en

harryhoch commented 6 years ago

configuration issue on Pitt servers.

mbayer-pitt commented 6 years ago

here is another solution if you still have issues with import spacy nlp = spacy.load('en')

replace them with import en_core_web_sm nlp = en_core_web_sm.load()

here is where I found it: (https://spacy.io/usage/models)

harryhoch commented 6 years ago

Thanks!