title: TypeError: a bytes-like object is required, not 'str' for Image command in Python
body: <p>I'm trying to load the image of the Decision Tree in Python but I'm unable to do so.</p>
  
  <p>The code is:</p>
  
  <pre><code>from IPython.display import Image  
  #import pydotplus as pydot
  from sklearn import tree
  from os import system
  
  train_char_label = ['1', '2']
  park_Tree_File = open('park_tree.dot','w')
  dot_data = tree.export_graphviz(dt_model, out_file=park_Tree_File, 
  feature_names = list(train_set),
                                  class_names = list(train_char_label))
  
  park_Tree_File.close()
  
  print (pd.DataFrame(dt_model.feature_importances_, columns = ["Imp"], index 
  = train_set.columns))
  
  system("dot -Tpng park_tree.dot -o park_tree.png") # This command is to OS
  Image("park_tree.png") # use the image command to read the .png file 
                         # and print on screen
  </code></pre>
  
  <p>I get the following error:</p>
  
  <blockquote>
    <p>TypeError: a bytes-like object is required, not 'str' for Image command in Python</p>
  </blockquote>
  
  <p>Can you please suggest what is going wrong with the <code>Image</code> command?
  The <code>print</code> command before that is working fine and printing the <code>feature_importance</code> perfectly.</p>