title: AttributeError: module 'networkx' has no attribute 'nx_pydot'
body: <p>I'm trying to execute a python file named demo.py (which imports another file takahe2.py) in python virtual environment with python3.7. I am trying to get the output of some strings as text in a .txt file. But when I run the code it shows the output in the console but failed to create a .txt file, showing this error:</p>
  <p><code>File &quot;/home/user/takahe2.py&quot;, line 932, in write_dot</code></p>
  <p><code>nx.nx_pydot.write_dot(self.graph, dotfile)</code></p>
  <p><code>AttributeError: module 'networkx' has no attribute 'nx_pydot'</code></p>
  <p>In takahe2.py:</p>
  <p>I have imported these:</p>
  <p><code>from networkx.drawing.nx_agraph import write_dot</code>
  <code>from networkx.drawing.nx_pydot import write_dot</code></p>
  <p>Corresponding function in takahe2.py:</p>
  <pre><code> `def write_dot(self, dotfile):`
      &quot;&quot;&quot; Outputs the word graph in dot format in the specified file. &quot;&quot;&quot;
      
      # nx.write_dot(self.graph, dotfile)
      nx.nx_pydot.write_dot(self.graph, dotfile)`
  </code></pre>
  <p>The actual file I'm trying to run demo.py: (Portion of the code is shown where error occurred:)</p>
  <p><code>for i in range(1,140):</code></p>
  <pre><code>serial_no = str(i)
  document = open('DataSet/Source/'+serial_no+'.txt').read()
  doc = sentTokenizer.sentTokenizing().sentTokenize(document)
  print('doc',doc)
  
  filenamee, n = clustering.startF(doc)
  print(&quot;\n\nSource:&quot;,document)
  
  summary = getSummary(filenamee)
  print('\n\nSummary:',summary)
  
  # save the summary
  createFolder('DataSet/')
  fi = open('DataSet/'+serial_no+'.txt','+w')
  fi.write(summary)
  </code></pre>
  <p>My networkx version is 1.7. Os: Linux</p>