title: Python AttributeError: 'module' object has no attribute 'Serial'
body: <p>I'm trying to access a serial port with Python 2.6 on my Raspberry Pi running Debian.
  My script named <code>serial.py</code> tries to import pySerial:</p>
  <pre><code>import serial
  ser = serial.Serial('/dev/ttyAMA0', 9600)
  ser.write(&quot;hello world!&quot;)
  </code></pre>
  <p>For some reason it refuses to establish the serial connection with this error:</p>
  <pre><code>AttributeError: 'module' object has no attribute 'Serial'
  </code></pre>
  <p>When I try to type the same code in the interactive Python interpreter it still doesn't work.</p>
  <p>Strangely, it used to work about a couple hours ago.</p>
  <p>What could be the problem? I've tried to fix this for a while, installing pySerial again, rewriting my code, double-checking the serial port, etc.</p>