OmkarPathak / pyresparser

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

getting command not found error for pyresparser #2

Closed raghuveer closed 5 years ago

raghuveer commented 5 years ago

Dear Omkar

I did install Pyresparser on my ubuntu server using the following command,

pip install pyresparser

While the script is correctly installed with all dependencies, I am getting Command not found error, when trying to parse a resume, by typing the command through Putty SSH Client.

aj@ubuntu:~/webapps/app-aj/files$ pyresparser -f resume.pdf pyresparser: command not found

I would request you to please share, if I need to do anything else?

thank you

With Best Regards Raghu veer

OmkarPathak commented 5 years ago

From logs I can see that you are using aj as your user. Make sure you have installed the package for the same user

raghuveer commented 5 years ago

Thanks for the quick response

I am able to use Pyresparser today, and installed Spacy, NLTK, as per your github page.

Then imported Nltk and corresponding stop words, as instructed, in the error message when running Pyresparser.

The following is the error message I receive, when trying to extract data from a PDF formatted Resume.

aj@ubuntu:~/webapps/app-apidev/uploaded-documents$ pyresparser -f e854f46a2450133ffd70124c8116bc8906312f119f246216332aeef3452df803.pdf Traceback (most recent call last): File "/home/aj/.local/bin/pyresparser", line 7, in from pyresparser.command_line import main File "/home/aj/.local/lib/python2.7/site-packages/pyresparser/command_line.py", line 8, in from urllib.request import Request, urlopen ImportError: No module named request

Do I need to install Pyresparser and Nltk as Root User, instead of normal SSH User? Please share your inputs,

thank you

OmkarPathak commented 5 years ago

From logs it seems you are using Python 2.7. pyresparser only supports Python 3. Please upgrade your Python version and try again

raghuveer commented 5 years ago

As suggested by you, I did install Python 3.7.3, but when I run the pyresparser, I still see it using Python 2.7, in the error message. I did re-install Pyresparser once again, still same error,

+++++++++ aj@ubuntu:~/webapps/app-apidev/uploaded-documents$ pyresparser -f ff76a401dc811d5119adec1c14e832fe363cd8d6658f50f786fa91d782e55b97.pdf Traceback (most recent call last): File "/home/aj/.local/bin/pyresparser", line 7, in from pyresparser.command_line import main File "/home/aj/.local/lib/python2.7/site-packages/pyresparser/command_line.py", line 8, in from urllib.request import Request, urlopen ImportError: No module named request

+++++++++++

please check and share your inputs

thank you

OmkarPathak commented 5 years ago

This is because previously you installed using pip. You now have to install using pip3. So you can execute pip3 install pyresparser

raghuveer commented 5 years ago

I did install python pip3, and then tried installing pyresparser using the above mentioned command

pip3 install pyresparser

Got Errors with spacy and other dependencies and I got error when running the PDF Resume Extraction, when I see Python 2.7 in error

=========

aj@ubuntu:~/webapps/app-apidev/uploaded-documents$ pyresparser -f ff76a401dc811d5119adec1c14e832fe363cd8d6658f50f786fa91d782e55b97.pdf Traceback (most recent call last): File "/home/aj/.local/bin/pyresparser", line 7, in from pyresparser.command_line import main File "/home/aj/.local/lib/python2.7/site-packages/pyresparser/command_line.py", line 8, in from urllib.request import Request, urlopen ImportError: No module named request aj@ubuntu-s-2vcpu-2gb-sfo2-01-web-server:~/webapps/app-apidev/uploaded-documents$

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

please chekc and share your inputs

thank you

OmkarPathak commented 5 years ago

No for some reason you are still accessing Python 2.7 Try this approach. In .bashrc file (which is located in your home directory) add the following line at the end: export python=python3. Then save the file and open a new terminal and try the pyresparser command

raghuveer commented 5 years ago

I did add the code, as you suggested above

same error continues

raghuveer commented 5 years ago

Alternatively, Do I setup on a different server (with Ubuntu 18.04), upgrade Python from v2.7 to 3.7.3, install PIP3 and then try installing Pyresparser?

please share your inputs

thank you

OmkarPathak commented 5 years ago

You can try this

raghuveer commented 5 years ago

While I have had issues in the other setup, my server admin helped me config python 3

I am able to start Extracting Resume Data.

I will test this further and will share updates

Thank you

With Best Regards Raghu Veer

OmkarPathak commented 5 years ago

Perfect! Closing the issue for now.