title: Topic modelling with Python subprocess.CalledProcessError
body: <p>I need to create a topic modelling for my uni project, and what I'm doing is trying to repeat what this guy is doing: <a href="https://www.youtube.com/watch?v=TgXLq1XIdA0" rel="nofollow noreferrer">https://www.youtube.com/watch?v=TgXLq1XIdA0</a></p>
  <p>So far I'm running his code till the line 45, I'm copying it here:</p>
  <pre><code>#creating our first topic model :)
  #importing the necessary libraries
  import gensim, nltk, os
  
  #defining lists to work on with
  #tokens from each file stored here
  texts = []
  #files' names
  labels = []
  
  #iterating through all files in the corpus folder
  for root, dirs, files in os.walk('CEOs_speeches_all'):
      for file_name in files:
          with open(os.path.join(root, file_name),encoding='utf8') as rf:
              #opening each file as a text for reading
              text = rf.read()
              #tokenising words with nltk
              tokens = nltk.word_tokenize(text)
              #getting rid of all tokens that are not numerical or alphabetical i.e. spaces, punctuation
              cleaned = [word for word in tokens if word.isalnum()]
              texts.append(cleaned)
              #putting files' names without extension (.txt) into the list
              labels.append(file_name[:-4])
  
  #transforming the corpus to run in gensim
  corpus_dictionary = gensim.corpora.Dictionary(texts)
  corpus_dictionary.filter_extremes(no_below=5)
  #transforming the corpus text list into the list of bags of words
  processed_corpus = [corpus_dictionary.doc2bow(text) for text in texts]
  
  #printing the first file for checking
  #print(processed_corpus[0])
  
  #defining the number of topics
  number_of_topics = 10
  
  #specifying where mallet lives
  mallet_path = os.path.join(&quot;C:\mallet&quot;, &quot;bin&quot;, &quot;mallet&quot;)
  
  #creating the mallet modeling object
  lda_model = gensim.models.wrappers.ldamallet.LdaMallet(
      mallet_path,
      corpus=processed_corpus,
      id2word=corpus_dictionary,
      num_topics=number_of_topics,
      optimize_interval=10,
      prefix='fed_'
  )
  </code></pre>
  <p>and I get this error message:
  subprocess.CalledProcessError: Command 'C:\mallet/bin/mallet import-file --preserve-case --keep-sequence --remove-stopwords --token-regex &quot;\S+&quot; --input fed_corpus.txt --output fed_corpus.mallet' returned non-zero exit status 127.</p>
  <p>Could someone help to fix, please? Any ideas?</p>
  <p>UPDATE: I changed the line mallet_path = os.path.join(&quot;C:\mallet&quot;, &quot;bin&quot;, &quot;mallet&quot;) to mallet_path = &quot;~/mallet/bin/mallet&quot; but it still shows the same error :/</p>