I have a python project that i setup using a virtualenv (pipenv). i use `pipenv shell` to create the virtual environment and from within their im able to run my script using `python main.py`

**main.py**

```
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()

```

Im trying to display a plot but i get the following error:

> 
> File
> "/home/linuxbrew/.linuxbrew/opt/python@3.8/lib/python3.8/tkinter/**init**.py",
> line 36, in 
> import \_tkinter # If this fails your Python may not be configured for Tk ModuleNotFoundError: No module named '\_tkinter'
> 
> 
> 

I have tried doing `sudo apt-get install python3-tk` and recreating the virtual env but this it did work.

1. Is there another way i can display a plot without tkinter? `matplotlib.use('TkAgg')`
2. Can i install tkinter from within the virtualenv?
3. Can the virtualenv access the machines version of tkinter (python3-tk)

**Python 3.8.5**