In this article, we’ll see a simple way to check if a module has been installed in Python or not
You can check if a module is installed on your device or not by running the command shown below on your command line interface. (command prompt or Powershell if you are on Windows, and the terminal app if you are on Mac or Linux)
pip show <module-name>
Be sure you replace <module-name> with the right one! For example, in my case, I would type in
pip show pandas
and I got the following result
That was a quick one!
For the next step in your Python journey I invite you to master some of the most common errors you will run into in your daily life as a Python developer. We have compiled a list of just 7 exceptions that you need to focus on if you wish to gain mastery of Exceptions in Python!
7 Most Common In-Built Exceptions in Python!
If you are a visual learner here is a YouTube video that we made on that same topic!
I hope that was helpful!
Here are some other helpful articles.
Related Articles
ModuleNotFoundError: A Step By Step Troubleshooting Guide!
7 Most Common In-Built Exceptions in Python!
Python Exceptions: Explained for Beginners!
Python: When To Use Custom Exceptions? Explained!
Python TypeError: A Step By Step Troubleshooting Guide!
Thanks to Namazi Jamal for his contributions in writing this article!