Considering how important indentation is in Python, I suggest you edit your post with the following:
When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.
You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.
Better to remove the backticks and unnecessary spaces:
import rasterio
from rasterio.plot import show
from matplotlib import pyplot
import matplotlib.pyplot as plt
Many campers help by copying the code, and running it in their environment. This is difficult if the code is not formatted correctly, and you are less likely to get help with messy code.