I am following a nlp tutorial this is the video I am on: https://www.youtube.com/watch?v=h2kBNEShsiE&list=PLeo1K3hjS3uuvuAXhYjV2lMEShq2UYSwX&index=7
In the video the instructor asks us to run the command python -m spacy download en but when I try to run it I get this:
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "C:UsersalokkAppDataLocalProgramsPythonPython311Libsite-packagesspacy__main__.py", line 4, in <module>
setup_cli()
File "C:UsersalokkAppDataLocalProgramsPythonPython311Libsite-packagesspacycli_util.py", line 87, in setup_cli
command(prog_name=COMMAND)
File "C:UsersalokkAppDataLocalProgramsPythonPython311Libsite-packagesclickcore.py", line 829, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:UsersalokkAppDataLocalProgramsPythonPython311Libsite-packagestypercore.py", line 783, in main
return _main(
^^^^^^
File "C:UsersalokkAppDataLocalProgramsPythonPython311Libsite-packagestypercore.py", line 199, in _main
args = click.utils._expand_args(args)
^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'click.utils' has no attribute '_expand_args'
I have tried running it in vscode command prompt, command prompt, administrator command prompt, powershell, and administrator powershell.
Can anyone help me?
I tried to install the en libraries for spacy but it didn’t work and returned an error.
1
Try upgrading click
pip install --upgrade click
Or
pip install -U click
https://pypi.org/project/click/
restart the kernel if you are using Jupyter.
I ran you command on the Google Colab and got this as output:
It seems that the commands have changed as of v3.0. Therefor you can try these that I used for custom NER training using spacy. Depending on the model size you can change to small or large.
!pip install -U spacy -q
!python -m spacy download en_core_web_lg
!python -m spacy info