I'm trying to run the twenty_newsgroups example. However, I have a lot of problems.
I realized this code use the old package. So, I tried to use the suggested version of package.
When I ran the preprocess.py, I use the spacy (0.99), but it said
Traceback (most recent call last): File "preprocess.py", line 31, in <module> n_threads=4) File "/home/allen.wu/lda2vec-master/lda2vec/preprocess.py", line 72, in tokenize for row, doc in enumerate(nlp.pipe(texts, **kwargs)): AttributeError: 'English' object has no attribute 'pipe'
I upgrade the spacy to (0.100.1), the error turn out:
Traceback (most recent call last): File "preprocess.py", line 31, in <module> n_threads=4) File "/home/allen.wu/lda2vec-master/lda2vec/preprocess.py", line 68, in tokenize nlp = English() File "/home/allen.wu/.local/lib/python2.7/site-packages/spacy/language.py", line 202, in __init__ package = util.get_package_by_name() File "/home/allen.wu/.local/lib/python2.7/site-packages/spacy/util.py", line 28, in get_package_by_name raise RuntimeError("Model not installed. Please run 'python -m " RuntimeError: Model not installed. Please run 'python -m spacy.en.download' to install latest compatible model.
I follow the commands to run 'python -m spacy.en.download', then
Traceback (most recent call last): File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/usr/lib/python2.7/runpy.py", line 72, in _run_code exec code in run_globals File "/home/allen.wu/.local/lib/python2.7/site-packages/spacy/en/download.py", line 58, in <module> plac.call(main) File "/usr/local/lib/python2.7/dist-packages/plac-0.9.6-py2.7.egg/plac_core.py", line 328, in call cmd, result = parser.consume(arglist) File "/usr/local/lib/python2.7/dist-packages/plac-0.9.6-py2.7.egg/plac_core.py", line 207, in consume return cmd, self.func(*(args + varargs + extraopts), **kwargs) File "/home/allen.wu/.local/lib/python2.7/site-packages/spacy/en/download.py", line 42, in main package = sputnik.install(about.__name__, about.__version__, about.__default_model__) File "/home/allen.wu/.local/lib/python2.7/site-packages/sputnik/__init__.py", line 44, in install archive = cache.fetch(package_name) File "/home/allen.wu/.local/lib/python2.7/site-packages/sputnik/cache.py", line 57, in fetch package = self.get(package_string) File "/home/allen.wu/.local/lib/python2.7/site-packages/sputnik/package_list.py", line 61, in get raise PackageNotFoundException(package_string) sputnik.package_list.PackageNotFoundException: en_default==1.0.5
Afterwards, I upgrade the spacy package to latest version. It said
Traceback (most recent call last): File "preprocess.py", line 12, in <module> from lda2vec import preprocess, Corpus File "/home/allen.wu/lda2vec-master/lda2vec/__init__.py", line 4, in <module> import preprocess File "/home/allen.wu/lda2vec-master/lda2vec/preprocess.py", line 1, in <module> import spacy File "/home/allen.wu/.local/lib/python2.7/site-packages/spacy/__init__.py", line 4, in <module> from .cli.info import info as cli_info File "/home/allen.wu/.local/lib/python2.7/site-packages/spacy/cli/__init__.py", line 1, in <module> from .download import download File "/home/allen.wu/.local/lib/python2.7/site-packages/spacy/cli/download.py", line 10, in <module> from .link import link File "/home/allen.wu/.local/lib/python2.7/site-packages/spacy/cli/link.py", line 7, in <module> from ..compat import symlink_to, path2str File "/home/allen.wu/.local/lib/python2.7/site-packages/spacy/compat.py", line 11, in <module> from thinc.neural.util import copy_array File "/home/allen.wu/.local/lib/python2.7/site-packages/thinc/neural/__init__.py", line 1, in <module> from ._classes.model import Model File "/home/allen.wu/.local/lib/python2.7/site-packages/thinc/neural/_classes/model.py", line 12, in <module> from ..train import Trainer File "/home/allen.wu/.local/lib/python2.7/site-packages/thinc/neural/train.py", line 3, in <module> from .optimizers import Adam, SGD, linear_decay File "optimizers.pyx", line 13, in init thinc.neural.optimizers File "ops.pyx", line 52, in init thinc.neural.ops AttributeError: 'module' object has no attribute 'PinnedMemoryPool'
I was stuck by this code for few days. Is there any one success running this example?
I'm trying to run the twenty_newsgroups example. However, I have a lot of problems. I realized this code use the old package. So, I tried to use the suggested version of package. When I ran the preprocess.py, I use the spacy (0.99), but it said
Traceback (most recent call last): File "preprocess.py", line 31, in <module> n_threads=4) File "/home/allen.wu/lda2vec-master/lda2vec/preprocess.py", line 72, in tokenize for row, doc in enumerate(nlp.pipe(texts, **kwargs)): AttributeError: 'English' object has no attribute 'pipe'
I upgrade the spacy to (0.100.1), the error turn out:
Traceback (most recent call last): File "preprocess.py", line 31, in <module> n_threads=4) File "/home/allen.wu/lda2vec-master/lda2vec/preprocess.py", line 68, in tokenize nlp = English() File "/home/allen.wu/.local/lib/python2.7/site-packages/spacy/language.py", line 202, in __init__ package = util.get_package_by_name() File "/home/allen.wu/.local/lib/python2.7/site-packages/spacy/util.py", line 28, in get_package_by_name raise RuntimeError("Model not installed. Please run 'python -m " RuntimeError: Model not installed. Please run 'python -m spacy.en.download' to install latest compatible model.
I follow the commands to run 'python -m spacy.en.download', then
Traceback (most recent call last): File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/usr/lib/python2.7/runpy.py", line 72, in _run_code exec code in run_globals File "/home/allen.wu/.local/lib/python2.7/site-packages/spacy/en/download.py", line 58, in <module> plac.call(main) File "/usr/local/lib/python2.7/dist-packages/plac-0.9.6-py2.7.egg/plac_core.py", line 328, in call cmd, result = parser.consume(arglist) File "/usr/local/lib/python2.7/dist-packages/plac-0.9.6-py2.7.egg/plac_core.py", line 207, in consume return cmd, self.func(*(args + varargs + extraopts), **kwargs) File "/home/allen.wu/.local/lib/python2.7/site-packages/spacy/en/download.py", line 42, in main package = sputnik.install(about.__name__, about.__version__, about.__default_model__) File "/home/allen.wu/.local/lib/python2.7/site-packages/sputnik/__init__.py", line 44, in install archive = cache.fetch(package_name) File "/home/allen.wu/.local/lib/python2.7/site-packages/sputnik/cache.py", line 57, in fetch package = self.get(package_string) File "/home/allen.wu/.local/lib/python2.7/site-packages/sputnik/package_list.py", line 61, in get raise PackageNotFoundException(package_string) sputnik.package_list.PackageNotFoundException: en_default==1.0.5
Afterwards, I upgrade the spacy package to latest version. It said
Traceback (most recent call last): File "preprocess.py", line 12, in <module> from lda2vec import preprocess, Corpus File "/home/allen.wu/lda2vec-master/lda2vec/__init__.py", line 4, in <module> import preprocess File "/home/allen.wu/lda2vec-master/lda2vec/preprocess.py", line 1, in <module> import spacy File "/home/allen.wu/.local/lib/python2.7/site-packages/spacy/__init__.py", line 4, in <module> from .cli.info import info as cli_info File "/home/allen.wu/.local/lib/python2.7/site-packages/spacy/cli/__init__.py", line 1, in <module> from .download import download File "/home/allen.wu/.local/lib/python2.7/site-packages/spacy/cli/download.py", line 10, in <module> from .link import link File "/home/allen.wu/.local/lib/python2.7/site-packages/spacy/cli/link.py", line 7, in <module> from ..compat import symlink_to, path2str File "/home/allen.wu/.local/lib/python2.7/site-packages/spacy/compat.py", line 11, in <module> from thinc.neural.util import copy_array File "/home/allen.wu/.local/lib/python2.7/site-packages/thinc/neural/__init__.py", line 1, in <module> from ._classes.model import Model File "/home/allen.wu/.local/lib/python2.7/site-packages/thinc/neural/_classes/model.py", line 12, in <module> from ..train import Trainer File "/home/allen.wu/.local/lib/python2.7/site-packages/thinc/neural/train.py", line 3, in <module> from .optimizers import Adam, SGD, linear_decay File "optimizers.pyx", line 13, in init thinc.neural.optimizers File "ops.pyx", line 52, in init thinc.neural.ops AttributeError: 'module' object has no attribute 'PinnedMemoryPool'
I was stuck by this code for few days. Is there any one success running this example?