title: Kernel died restarting spyder and PyQt5
body: <p>I am experiencing a strange issue on my PyQt5 running on Python for Windows 10 64 bit. I am using Spyder as editor. </p>
  
  <p>Below is my code</p>
  
  <pre><code>#read in a table from db
  dbpath = r"c:\mypath\TransactionToday.db"
  dbpath.replace('\\','/')
  import sqlite3 as sql
  conn = sql.connect(dbpath)
  c = conn.cursor()
  c.execute("SELECT * FROM Bord_1_2127")
  data = c.fetchall()
  conn.close()
  from PyQt5.QtWidgets import(QTableWidget, QTableWidgetItem)
  tw = QTableWidget()
  tw.setRowCount(len(data))
  tw.setColumnCount(4)
  r = -1
  c = -1
  </code></pre>
  
  <p>When I debug my code I see that the kernel died at </p>
  
  <pre><code>tw = QTableWidget()
  </code></pre>
  
  <p>I am not sure the reason why, as if I fresh restart my PC I can get it to work. However if I run this code multiple times, all of sudden I keep getting into the Kernel died restart issue. When I search on this issue I see multiple report on that this problem is related to Windows 10 and others mention that it is due to start up of too many instances of PyQt5. I am not sure if this is my case, since I guess my code is not starting up any instances related to QApplication?</p>