title: How can I fix the error "cannot import name 'serial' from 'serial' (unknown location)"?
body: <p>In my code I try to interact with some equipment using the <code>serial</code> module:</p>
  <pre class="lang-py prettyprint-override"><code>from serial import serial
  
  ser = serial.Serial('/dev/ttyUSB0')  # open serial port
  
  print(ser.name)         # check which port was really used
  
  ser.write(b'hello')     # write a string
  
  ser.close()
  </code></pre>
  <p>But I get this error:</p>
  <pre class="lang-none prettyprint-override"><code>cannot import name 'serial' from 'serial' (unknown location)
  </code></pre>
  <p>I searched on Stack Overflow for this error message but I could not find an answer which resolves my problem.</p>
  <p>Based on what I found, I tried:</p>
  <ul>
  <li><code>pip install serial</code>,</li>
  <li><code>pip install pyserial</code>,</li>
  <li>and also unistall and reinstall.</li>
  </ul>
  <p>How can I fix this error?</p>