title: AttributeError: type object 'spacy.syntax.nn_parser.array' has no attribute '__reduce_cython__' , (adding Paths to virtual environments)
body: <h1>Overall problem</h1>
  
  <p>I am working on a nlp project and want to use spacy. But when trying to load the language for an nlp object, I keep running into an error:</p>
  
  <pre><code>AttributeError: type object 'spacy.syntax.nn_parser.array' has no attribute '__reduce_cython__'
  </code></pre>
  
  <p>Code:
  </p>
  
  <pre><code>    test = nlp('many people like laughing while they are running')
      for word in test:
          print(word.text,word.lemma)
  </code></pre>
  
  <p>I am not sure but the problem could have something to do with the virtual environment I am working with. One solution I found suggested to "add the spaCy path to PYTHONPATH in virtualenv" </p>
  
  <p>So my actual 2 Questions are:
  1) Where do you think my problem is?
  2) If you think the problem has something to do with the virtual enviroment, how do I add the spaCy path to PYTHONPATH in virtualenv?</p>
  
  <p>Thank you in advance for the help</p>
  
  <h1>Background Info:</h1>
  
  <p>I am a beginner so I don't know much about stack overflow, venvs and what information you need to understand my problem. This is what I can give you:</p>
  
  <p>I am following this tutorial:
  <a href="https://github.com/bhargavvader/personal/tree/master/notebooks/text_analysis_tutorial" rel="noreferrer">https://github.com/bhargavvader/personal/tree/master/notebooks/text_analysis_tutorial</a></p>
  
  <h2>My environment:</h2>
  
  <pre><code>Operating System: Linux Mint 19.1 Cinnamon
  Python Version Used: Python 3.7.1
  spaCy Version Used: 2.1.3
  </code></pre>
  
  <p>I am using python through anaconda </p>
  
  <p><em>What I have done so far:</em>
  of course I searched the internet for the error
  This is my error log:</p>
  
  <h1>What I have done so far</h1>
  
  <h3>1)I uninstalled and reinstalled spicy</h3>
  
  <h3>2)I checked out the spacy files</h3>
  
  <p>How I understood this is the part in the error log where the mistake occurs?:</p>
  
  <p>----> 4 from .pipes import Tagger, DependencyParser, EntityRecognizer</p>
  
  <p>So I looked though my spacy folder to check out the pipes script. But couldn't find a point where the functions Tagger, DependencyParser and EntityRecognizer called for '<strong>reduce_cython</strong>'</p>
  
  <h3>1) I have searched the Error log on the internet:</h3>
  
  <p>To my understanding the similar questions that were asked did not help me in my problem: </p>
  
  <p>The only question that was similar to my problem is the following:
  <a href="https://github.com/explosion/spaCy/issues/2439" rel="noreferrer">https://github.com/explosion/spaCy/issues/2439</a></p>
  
  <p>Their solution was "adding spaCy path to PYTHONPATH in virtualenv"</p>
  
  <p>So I searched how to add paths to cette python path and found:
  <a href="https://stackoverflow.com/questions/10738919/how-do-i-add-a-path-to-pythonpath-in-virtualenv">How do I add a path to PYTHONPATH in virtualenv</a></p>
  
  <p>Yet I don't quite understand the answers. And I am still not sure if that is even the problem. So If you know the answer to my problem or could give me some guidance of how to continue figuring out this problem. I'd be relieved. </p>
  
  <h3>Further information:</h3>
  
  <p>If it is of importance, when following the turtorial I mentioned earlier I did run into the problem of not being able to download the requirements.
  This is what my termnial would give me:</p>
  
  <pre>Could not open requirements file: [Errno 2] No such file or directory: &apos;REQUIREMENTS_1.txt&apos;
  </pre>
  
  <p>I ignored it bc everything worked smoothly at first. </p>
  
  <h2><em>Error log</em></h2>
  
  <p>AttributeError                            Traceback (most recent call last)
   in 
  ----> 1 nlp = spacy.load('en')
        2 
        3 test = nlp('many people like laughing while they are running')
        4 for word in test:
        5     print(word.text,word.lemma)</p>
  
  <p>~/anaconda3/lib/python3.7/site-packages/spacy/<strong>init</strong>.py in load(name, **overrides)
       13 from .glossary import explain
       14 from .about import <strong>version</strong>
  ---> 15 from .errors import Errors, Warnings, deprecation_warning
       16 from . import util
       17 </p>
  
  <p>~/anaconda3/lib/python3.7/site-packages/spacy/util.py in load_model(name, **overrides)
      110     """
      111     if isinstance(path, basestring_):
  --> 112         return Path(path)
      113     else:
      114         return path</p>
  
  <p>~/anaconda3/lib/python3.7/site-packages/spacy/util.py in load_model_from_link(name, **overrides)
      127         if Path(name).exists():  # path to model data directory
      128             return load_model_from_path(Path(name), **overrides)
  --> 129     elif hasattr(name, "exists"):  # Path or Path-like to model data
      130         return load_model_from_path(name, **overrides)
      131     raise IOError(Errors.E050.format(name=name))</p>
  
  <p>~/anaconda3/lib/python3.7/site-packages/spacy/data/en/<strong>init</strong>.py in load(**overrides)
       10 
       11 def load(**overrides):
  ---> 12     return load_model_from_init_py(<strong>file</strong>, **overrides)</p>
  
  <p>~/anaconda3/lib/python3.7/site-packages/spacy/util.py in load_model_from_init_py(init_file, **overrides)
      171 def load_model_from_init_py(init_file, **overrides):
      172     """Helper function to use in the <code>load()</code> method of a model package's
  --> 173     <strong>init</strong>.py.
      174 
      175     init_file (unicode): Path to model's <strong>init</strong>.py, i.e. <code>__file__</code>.</p>
  
  <p>~/anaconda3/lib/python3.7/site-packages/spacy/util.py in load_model_from_path(model_path, meta, **overrides)
      141     return cls.load(**overrides)
      142 
  --> 143 
      144 def load_model_from_package(name, **overrides):
      145     """Load a model from an installed package."""</p>
  
  <p>~/anaconda3/lib/python3.7/site-packages/spacy/util.py in get_lang_class(lang)
       48     """
       49     global LANGUAGES
  ---> 50     return lang in LANGUAGES
       51 
       52 </p>
  
  <p>~/anaconda3/lib/python3.7/importlib/<strong>init</strong>.py in import_module(name, package)
      125                 break
      126             level += 1
  --> 127     return _bootstrap._gcd_import(name[level:], package, level)
      128 
      129 </p>
  
  <p>~/anaconda3/lib/python3.7/importlib/_bootstrap.py in _gcd_import(name, package, level)</p>
  
  <p>~/anaconda3/lib/python3.7/importlib/_bootstrap.py in _find_and_load(name, import_)</p>
  
  <p>~/anaconda3/lib/python3.7/importlib/_bootstrap.py in _find_and_load_unlocked(name, import_)</p>
  
  <p>~/anaconda3/lib/python3.7/importlib/_bootstrap.py in _load_unlocked(spec)</p>
  
  <p>~/anaconda3/lib/python3.7/importlib/_bootstrap_external.py in exec_module(self, module)</p>
  
  <p>~/anaconda3/lib/python3.7/importlib/_bootstrap.py in _call_with_frames_removed(f, *args, **kwds)</p>
  
  <p>~/anaconda3/lib/python3.7/site-packages/spacy/lang/en/<strong>init</strong>.py in 
       13 from ..tokenizer_exceptions import BASE_EXCEPTIONS
       14 from ..norm_exceptions import BASE_NORMS
  ---> 15 from ...language import Language
       16 from ...attrs import LANG, NORM
       17 from ...util import update_exc, add_lookups</p>
  
  <p>~/anaconda3/lib/python3.7/site-packages/spacy/language.py in 
       15 from .vocab import Vocab
       16 from .lemmatizer import Lemmatizer
  ---> 17 from .pipeline import DependencyParser, Tensorizer, Tagger, EntityRecognizer
       18 from .pipeline import SimilarityHook, TextCategorizer, Sentencizer
       19 from .pipeline import merge_noun_chunks, merge_entities, merge_subtokens</p>
  
  <p>~/anaconda3/lib/python3.7/site-packages/spacy/pipeline/<strong>init</strong>.py in 
        2 from <strong>future</strong> import unicode_literals
        3 
  ----> 4 from .pipes import Tagger, DependencyParser, EntityRecognizer
        5 from .pipes import TextCategorizer, Tensorizer, Pipe, Sentencizer
        6 from .entityruler import EntityRuler</p>
  
  <p>pipes.pyx in init spacy.pipeline.pipes()</p>
  
  <p>~/anaconda3/lib/python3.7/site-packages/spacy/syntax/nn_parser.cpython-37m-x86_64-linux-gnu.so in init spacy.syntax.nn_parser()</p>
  
  <p>AttributeError: type object 'spacy.syntax.nn_parser.array' has no attribute '<strong>reduce_cython</strong>'</p>