OmkarPathak / pyresparser

A simple resume parser used for extracting information from resumes
GNU General Public License v3.0
774 stars 395 forks source link

Error with loading en_core_web_sm with Spacy #3

Closed raghuveer closed 4 years ago

raghuveer commented 4 years ago

Dear Mr.Omkar

I am installing Pyresparser, on a different server, with Python 3.6.3

I did the installation using the following commands,

============

aj@ubuntu:~$ pip3 install pyresparser

aj@ubuntu:~$ pip install -U spacy

aj@ubuntu:~$ python -m spacy download en_core_web_sm

aj@ubuntu:~$ pip install --user -U nltk

aj@ubuntu:~$ python -m nltk.downloader words

aj@ubuntu:~$ python

import nltk nltk.download('stopwords')

=================

Error Message:

aj@ubuntu:~/webapps/app-quitzon/uploaded-documents$ pyresparser -f ffc6f69b791e2aecbd859e0932a5ea97ccdfeccaef67e64f8c93f7c684b5c99b.pdf Extracting data from: ffc6f69b791e2aecbd859e0932a5ea97ccdfeccaef67e64f8c93f7c684b5c99b.pdf Traceback (most recent call last): File "/home/aj/.local/bin/pyresparser", line 11, in sys.exit(main()) File "/home/aj/.local/lib/python3.6/site-packages/pyresparser/command_line.py", line 77, in main pprint(cli_obj.extract_resume_data()) File "/home/aj/.local/lib/python3.6/site-packages/pyresparser/command_line.py", line 28, in extract_resume_data return self.extract_from_file(args.file) File "/home/aj/.local/lib/python3.6/site-packages/pyresparser/command_line.py", line 37, in extract_from_file resume_parser = ResumeParser(file) File "/home/aj/.local/lib/python3.6/site-packages/pyresparser/resume_parser.py", line 13, in init__ nlp = spacy.load('en_core_web_sm') File "/home/aj/.local/lib/python3.6/site-packages/spacy/init__.py", line 27, in load return util.load_model(name, **overrides) File "/home/aj/.local/lib/python3.6/site-packages/spacy/util.py", line 139, in load_model raise IOError(Errors.E050.format(name=name)) OSError: [E050] Can't find model 'en_core_web_sm'. It doesn't seem to be a shortcut link, a Python package or a valid path to a data directory.

Please suggest, if I can need to do anything, whenever I try installing it, all steps happened correctly, for now and when the file is being extracted, I get this error now

thank you

With Best Regards Raghu Veer

OmkarPathak commented 4 years ago

You have executed this pip3 install pyresparser using pip3 and all other packages were downloaded sing pip. This is not a right way to do it. Either use pip throughout or use pip3. I would recommend using pip3 everytime

raghuveer commented 4 years ago

I got error when I tried installing Spacy using pip3

and am able to installspacy, nltk using PIp, along with dependencies and data import, so I tried that way.

I will try spacy with pip3 once again,

thank you

OmkarPathak commented 4 years ago

Ok do let me know the updates

OmkarPathak commented 4 years ago

@raghuveer any update?

OmkarPathak commented 4 years ago

Closing because of inactivity

JastySaran commented 4 years ago

Worked for me :

If using pycharm IDE copy pycharm project interrupter path space —m spacy download your package