Raspberry Pi

How to Find Install Python Modules and Versions on Raspberry Pi

The official language of Raspberry Pi is Python, which includes a long list of available python libraries/modules pre-installed within the system. If you want to find out the information about installed python modules and their versions on Raspberry Pi system, follow this article for guidance.

Python Installed Modules and Versions on Raspberry Pi?

There are various commands that help you in finding the list of installed python modules, count the number of modules, list the versions and a detail of a specific module on the Raspberry Pi system. The commands display the:

List the Modules and Versions

If you are looking for a command to specifically list all the installed python modules installed on Raspberry Pi system, you can use the below-written command:

$ pip freeze

And to list all the installed modules along with their versions, you can run the following command:

$ pip list

List the Version of a Specific Module

To list a specific module’s version out of all the modules that are installed on Raspberry Pi, the below-mentioned piped command is used:

Syntax

$ pip list | grep <module name>

Example

$ pip list | grep click

The output of the command has displayed the version of the specific python module.

Count the Total Number of Modules

To find the total number of installed Python modules on Raspberry Pi system, the below-written word count (wc) command is piped along with the pip list command:

$ pip list | wc -l

List the Details of a Specific Module

If you want to display a complete details of a specific Python module including its location, version, license, and other such details, use the below-given command:

Syntax

$ pip show <module name>

Example

$ pip show attrs

All the above commands are crucial for the Raspberry Pi users interested in finding the Python modules and their versions on the Raspberry Pi system.

Conclusion

To find the installed python modules and their versions on Raspberry Pi, there are several commands discussed in the above guidelines. The pip list and pip freeze command display the list of all the Python-installed modules, while the pip list command piped with wc -l displays the count of total modules installed on the Raspberry Pi system. If you are finding the version and details of a specific module, you can go with the pip show command with module name.

About the author

Zahra Zamir

An Electronics graduate who loves to learn and share the knowledge, my passion for my field has helped me grasp complex electronics concepts and now I am here to share them with others.