title: ModuleNotFoundError: No module named '_tkinter' within virtualenv
body: <p>I have a python project that i setup using a virtualenv (pipenv). i use <code>pipenv shell</code> to create the virtual environment and from within their im able to run my script using <code>python main.py</code></p>
  <p><strong>main.py</strong></p>
  <pre><code>import tkinter
  import matplotlib
  matplotlib.use('TkAgg')
  import matplotlib.pyplot as plt
  import numpy as np
  
  
  x = np.arange(0, 5, 0.1);
  y = np.sin(x)
  plt.plot(x, y)
  plt.show()
  </code></pre>
  <p>Im trying to display a plot but i get the following error:</p>
  <blockquote>
  <p>File
  &quot;/home/linuxbrew/.linuxbrew/opt/python@3.8/lib/python3.8/tkinter/<strong>init</strong>.py&quot;,
  line 36, in 
  import _tkinter # If this fails your Python may not be configured for Tk ModuleNotFoundError: No module named '_tkinter'</p>
  </blockquote>
  <p>I have tried doing <code>sudo apt-get install python3-tk</code> and recreating the virtual env but this it did work.</p>
  <ol>
  <li>Is there another way i can display a plot without tkinter? <code>matplotlib.use('TkAgg')</code></li>
  <li>Can i install tkinter from within the virtualenv?</li>
  <li>Can the virtualenv access the machines version of tkinter (python3-tk)</li>
  </ol>
  <p><strong>Python 3.8.5</strong></p>