在condas环境中导入Spacy问题

时间:2019-08-29 11:40:51

标签: python spacy

我想在程序中运行Spacy,但在导入库时遇到了麻烦。

我检查了我在PyCharm中是否使用了正确的conda环境。这似乎不是问题,因为我使用的是安装spacy==2.1.8版本的环境。还有什么问题吗?

 File "/Users/marcojoseruedaaguila/Desktop/ironhack/final_project/ironhack_finalproject/nlp_processing.py", line 5, in <module>
    import spacy
  File "/Users/marcojoseruedaaguila/miniconda3/envs/final_project/lib/python3.7/site-packages/spacy/__init__.py", line 12, in <module>
    from .cli.info import info as cli_info
  File "/Users/marcojoseruedaaguila/miniconda3/envs/final_project/lib/python3.7/site-packages/spacy/cli/__init__.py", line 1, in <module>
    from .download import download  # noqa: F401
  File "/Users/marcojoseruedaaguila/miniconda3/envs/final_project/lib/python3.7/site-packages/spacy/cli/download.py", line 4, in <module>
    import plac
  File "/Users/marcojoseruedaaguila/miniconda3/envs/final_project/lib/python3.7/site-packages/plac.py", line 29, in <module>
    from plac_core import *
  File "/Users/marcojoseruedaaguila/miniconda3/envs/final_project/lib/python3.7/site-packages/plac_core.py", line 98, in <module>
    PARSER_CFG = getfullargspec(argparse.ArgumentParser.__init__).args[1:]
AttributeError: module 'argparse' has no attribute 'ArgumentParser'

0 个答案:

没有答案