statsmaths / cleanNLP

R package providing annotators and a normalized data model for natural language processing
GNU Lesser General Public License v2.1
209 stars 36 forks source link

Python module 'cleannlp' not found #74

Closed redapemusic35 closed 2 years ago

redapemusic35 commented 4 years ago

Sorry, I am having serious difficulties of my own making here. I am using Rstudio and I've downloaded cleanNLP. However, I am not able to use the dependencies 'cnlp_init_corenlp()' or spacy. I would include a log file here, but I am not clear on where to find one and the only thing showing in my console is

library(cleanNLP) cnlp_init_corenlp() Error: Python module 'cleannlp' not found. Install with: pip install cleannlp

I am also receiving this message

Error: Python module 'cleannlp' not found. Install with: pip install cleannlp

  1. stop(msg, call. = (msg == ""))
  2. assert(!is.null(disc$required_module_path), "Python module 'cleannlp' not found. Install with:\n pip install cleannlp")
  3. check_python()
  4. cnlp_init_corenlp()

I think that step 3.

assert(!is.null(disc$required_module_path), "Python module 'cleannlp' not found. Install with:\n pip install cleannlp")

is where my problem is occurring. But I do not know how to address this particular issue.

For the time being, I am only trying to run the example found here:

But while I can use udpipe it seems like, it takes a really long time and I think that by using the python backends corenlp or spacy, my times will be shorter.

According to these instructions "In order to use the two Python backends, you must install the associated cleanNLP python module. We recommend and support the Python 3.7 version of Anaconda Python. After obtaining Python, install the module by running pip in a terminal:)"

Any ideas?

statsmaths commented 4 years ago

In order to run the Python backends, you need to install Python and then install the Python cleannlp package by running pip install cleannlp as indicated in the error message. Did you attempt to install Python or the module? Did you run into a specific issue installing either of those?

redapemusic35 commented 4 years ago

So yes, I have installed python and cleannlp. However, I also already have StanfordCoreNLP installed prior. Could this be causing a mixup? Also, I checked my cleannlp version and this is what I got, should I uninstall it and try again?

Requirement already satisfied: cleannlp in ./.local/lib/python2.7/site- packages Requirement already satisfied: spacy in ./.local/lib/python2.7/site- packages (from cleannlp) Requirement already satisfied: stanfordnlp in ./.local/lib/python2.7/site-packages (from cleannlp) Requirement already satisfied: preshed<3.1.0,>=3.0.2 in ./.local/lib/python2.7/site-packages (from spacy->cleannlp) Requirement already satisfied: pathlib==1.0.1; python_version < "3.4" in ./.local/lib/python2.7/site-packages (from spacy->cleannlp) Requirement already satisfied: setuptools in ./.local/lib/python2.7/site-packages (from spacy->cleannlp) Requirement already satisfied: plac<1.2.0,>=0.9.6 in ./.local/lib/python2.7/site-packages (from spacy->cleannlp) Requirement already satisfied: blis<0.5.0,>=0.4.0 in ./.local/lib/python2.7/site-packages (from spacy->cleannlp) Requirement already satisfied: requests<3.0.0,>=2.13.0 in ./.local/lib/python2.7/site-packages (from spacy->cleannlp) Requirement already satisfied: cymem<2.1.0,>=2.0.2 in ./.local/lib/python2.7/site-packages (from spacy->cleannlp) Requirement already satisfied: numpy>=1.15.0 in ./.local/lib/python2.7/site-packages (from spacy->cleannlp) Requirement already satisfied: catalogue<1.1.0,>=0.0.7 in ./.local/lib/python2.7/site-packages (from spacy->cleannlp) Requirement already satisfied: wasabi<1.1.0,>=0.4.0 in ./.local/lib/python2.7/site-packages (from spacy->cleannlp) Requirement already satisfied: murmurhash<1.1.0,>=0.28.0 in ./.local/lib/python2.7/site-packages (from spacy->cleannlp) Requirement already satisfied: thinc<7.4.0,>=7.3.0 in ./.local/lib/python2.7/site-packages (from spacy->cleannlp) Requirement already satisfied: srsly<1.1.0,>=0.1.0 in ./.local/lib/python2.7/site-packages (from spacy->cleannlp) Requirement already satisfied: torch>=1.0.0 in ./.local/lib/python2.7/site-packages (from stanfordnlp->cleannlp) Requirement already satisfied: tqdm in ./.local/lib/python2.7/site- packages (from stanfordnlp->cleannlp) Requirement already satisfied: protobuf in ./.local/lib/python2.7/site- packages (from stanfordnlp->cleannlp) Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in ./.local/lib/python2.7/site-packages (from requests<3.0.0,>=2.13.0-

spacy->cleannlp) Requirement already satisfied: chardet<4,>=3.0.2 in ./.local/lib/python2.7/site-packages (from requests<3.0.0,>=2.13.0- spacy->cleannlp) Requirement already satisfied: certifi>=2017.4.17 in ./.local/lib/python2.7/site-packages (from requests<3.0.0,>=2.13.0- spacy->cleannlp) Requirement already satisfied: idna<3,>=2.5 in ./.local/lib/python2.7/site-packages (from requests<3.0.0,>=2.13.0- spacy->cleannlp) Requirement already satisfied: importlib-metadata>=0.20; python_version< "3.8" in ./.local/lib/python2.7/site-packages (from catalogue<1.1.0,>=0.0.7->spacy->cleannlp) Requirement already satisfied: six>=1.9 in ./.local/lib/python2.7/site- packages (from protobuf->stanfordnlp->cleannlp) Requirement already satisfied: zipp>=0.5 in ./.local/lib/python2.7/site-packages (from importlib-metadata>=0.20; python_version < "3.8"->catalogue<1.1.0,>=0.0.7->spacy->cleannlp) Requirement already satisfied: configparser>=3.5; python_version < "3" in ./.local/lib/python2.7/site-packages (from importlib-metadata>=0.20; python_version < "3.8"->catalogue<1.1.0,>=0.0.7->spacy->cleannlp) Requirement already satisfied: contextlib2; python_version < "3" in ./.local/lib/python2.7/site-packages (from importlib-metadata>=0.20; python_version < "3.8"->catalogue<1.1.0,>=0.0.7->spacy->cleannlp) Requirement already satisfied: pathlib2; python_version < "3" in ./.local/lib/python2.7/site-packages (from importlib-metadata>=0.20; python_version < "3.8"->catalogue<1.1.0,>=0.0.7->spacy->cleannlp) Requirement already satisfied: scandir; python_version < "3.5" in ./.local/lib/python2.7/site-packages (from pathlib2; python_version < "3"->importlib-metadata>=0.20; python_version < "3.8"- catalogue<1.1.0,>=0.0.7->spacy->cleannlp)

On Fri, 2020-04-10 at 01:31 -0700, Taylor Arnold wrote:

In order to run the Python backends, you need to install Python and then install the Python cleannlp package by running pip install cleannlp as indicated in the error message. Did you attempt to install Python or the module? Did you run into a specific issue installing either of those? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.