For installing in a cell from inside a notebook, you’ll generally have a better experience using the magic commands added just for this. See here to learn more about `%pip install.
Your title doesn’t match your post. Maybe as a newer member you couldn’t change your title?
It is finding mglearn for import and giving you the error in your image. (Always best to post text code and text and not just images.)
The package has an issue currently. This is posted here in the issues for mglearn. Follow the advice there and you may be able to fix this.
Finally, this isn’t a Jupyter issue and hence isn’t pertinent to this forum. If you ran this same code in a Python console or directly as a Python script you have the same issues. That consideration should help you in discerning if issues are Jupyter or Python related. Jupyter can use a lot of different languages in the kernel.