title: How to over come this pdfviewer "No module named viewer" error in wxpython?
body: <p>I am trying to create an application that has a feature of displaying pdf files and decided to use wxpython to do this due to the pdfviewer class.</p>
  
  <p>I made sure that I have pyPDF2 and pyPdf. (can use either but installed both to see if that was the issue.)</p>
  
  <p>However when I run the code at the bottom. (taken from <a href="http://wxpython.org/Phoenix/docs/html/lib.pdfviewer.html" rel="nofollow">here</a>) (got rid of the ``` on lines 31 and 17. Added wx before .VSCROLL and .SUNKEN_BORDER on line 16) I get the message:</p>
  
  <pre><code>Traceback (most recent call last):
    File "E:\Test\pdf.py", line 4, in &lt;module&gt;
      from wx.lib.pdfviewer import pdfViewer, pdfButtonPanel
    File "C:\Python34\lib\site-packages\wx\lib\pdfviewer\__init__.py", line 124, in &lt;module&gt;
      from viewer import pdfViewer
  ImportError: No module named 'viewer'
  </code></pre>
  
  <p>When I then went to that package file to confirm that the module viewer was there I then ran it and line 124 worked. It just doesnt work when running through this example file which I assume is the same as when it will be in my application.</p>
  
  <p>Does anyone know what I need to do to fix this. This module looks perfect for what I plan on doing.</p>
  
  <p>Thanks</p>
  
  <pre><code>import wx
  import wx.lib.sized_controls as sc
  
  from wx.lib.pdfviewer import pdfViewer, pdfButtonPanel
  
  class PDFViewer(sc.SizedFrame):
      def __init__(self, parent, **kwds):
          super(PDFViewer, self).__init__(parent, **kwds)
  
          paneCont = self.GetContentsPane()
          self.buttonpanel = pdfButtonPanel(paneCont, wx.NewId(),
                                  wx.DefaultPosition, wx.DefaultSize, 0)
          self.buttonpanel.SetSizerProps(expand=True)
          self.viewer = pdfViewer(paneCont, wx.NewId(), wx.DefaultPosition,
                                  wx.DefaultSize,
                                  wx.HSCROLL|wx.VSCROLL|wx.SUNKEN_BORDER)
          self.viewer.UsePrintDirect = False
          self.viewer.SetSizerProps(expand=True, proportion=1)
  
          # introduce buttonpanel and viewer to each other
          self.buttonpanel.viewer = self.viewer
          self.viewer.buttonpanel = self.buttonpanel
  
  
  if __name__ == '__main__':
      import wx.lib.mixins.inspection as WIT
      app = WIT.InspectableApp(redirect=False)
  
  
      pdfV = PDFViewer(None, size=(800, 600))
      pdfV.viewer.UsePrintDirect = False
      pdfV.viewer.LoadFile(r'a path to a .pdf file')
      pdfV.Show()
  
      app.MainLoop()
  </code></pre>