Issue
My notebook was working fine till 7 days back, which was the last time I touched it. Now I am getting this error.
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-2-76a01d9c502b> in <module>
----> 1 import spacy
~\AppData\Roaming\Python\Python38\site-packages\spacy\__init__.py in <module>
12
13 from . import pipeline # noqa: F401
---> 14 from .cli.info import info # noqa: F401
15 from .glossary import explain # noqa: F401
16 from .about import __version__ # noqa: F401
~\AppData\Roaming\Python\Python38\site-packages\spacy\cli\__init__.py in <module>
1 from wasabi import msg
2
----> 3 from ._util import app, setup_cli # noqa: F401
4
5 # These are the actual functions, NOT the wrapped CLI commands. The CLI commands
~\AppData\Roaming\Python\Python38\site-packages\spacy\cli\_util.py in <module>
6 import srsly
7 import hashlib
----> 8 import typer
9 from click import NoSuchOption
10 from click.parser import split_arg_string
~\AppData\Roaming\Python\Python38\site-packages\typer\__init__.py in <module>
27
28 from . import colors as colors
---> 29 from .main import Typer as Typer
30 from .main import run as run
31 from .models import CallbackParam as CallbackParam
~\AppData\Roaming\Python\Python38\site-packages\typer\main.py in <module>
9 import click
10
---> 11 from .completion import get_completion_inspect_parameters
12 from .core import TyperArgument, TyperCommand
13 from .models import (
~\AppData\Roaming\Python\Python38\site-packages\typer\completion.py in <module>
8
9 import click
---> 10 import click._bashcomplete
11
12 from .models import ParamMeta
ModuleNotFoundError: No module named 'click._bashcomplete'
UPDATE:
I reinstalled spacy. Now I am getting this error:
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-2-76a01d9c502b> in <module>
----> 1 import spacy
~\Anaconda3\lib\site-packages\spacy\__init__.py in <module>
8
9 # These are imported as part of the API
---> 10 from thinc.neural.util import prefer_gpu, require_gpu
11
12 from . import pipeline
ModuleNotFoundError: No module named 'thinc.neural'
I then reinstalled thinc but the error isnt going away. I will attempt the other answer suggested. I am typing more because stackoverflow isnt letting me save the edits because it says my post is mostly code.
EDIT 2:
Ok, so I re-installed spacy after reinstalling thinc and now it seems to be working. phew..
Solution
Uninstall click and spaCy and then reinstall spaCy. If possible it's better to start in a clean environment, but at a minimum just doing those two should work.
To clarify, this is happening because the latest version of click doesn't work with spaCy. spaCy specifies using an old click version, so that'll be installed when you install spaCy, but if you upgrade click on your own spaCy won't stop you.
Answered By - polm23
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.