
- Python Basic Tutorial
- Python - Home
- Python - Overview
- Python - Environment Setup
- Python - Basic Syntax
- Python - Comments
- Python - Variables
- Python - Data Types
- Python - Operators
- Python - Decision Making
- Python - Loops
- Python - Numbers
- Python - Strings
- Python - Lists
- Python - Tuples
- Python - Dictionary
- Python - Date & Time
- Python - Functions
- Python - Modules
- Python - Files I/O
- Python - Exceptions
How can I get a list of locally installed Python modules?
There are multiple ways to get a list of locally installed Python modules. Easiest way is using the Python shell, for example,
>>> help('modules') Please wait a moment while I gather a list of all available modules... BaseHTTPServer brain_nose markupbase stat Bastion brain_numpy marshal statvfs CGIHTTPServer brain_pkg_resources math string Canvas brain_pytest matplotlib stringold ... ...
If you want to get the list of installed modules in your terminal, you can use the Python package manager, pip. For example,
$ pip freeze
You will get the output:
asn1crypto==0.22.0 astroid==1.5.2 attrs==16.3.0 Automat==0.5.0 backports.functools-lru-cache==1.3 cffi==1.10.0 ...
If you have pip version >= 1.3, you can also use pip list. For example,
$ pip list asn1crypto (0.22.0) astroid (1.5.2) attrs (16.3.0) Automat (0.5.0) backports.functools-lru-cache (1.3) ... ...
- Related Articles
- How to get a list of installed android Applications?
- How can I import modules for a Python Azure Function?
- How to get a list of installed Android applications in Kotlin?
- How can I save HTML locally with JavaScript?
- How do I get IntelliJ to recognize common Python modules?
- How to get the list of packages installed in base R?
- How can I get elements from a Java List?
- How do I get list of methods in a Python class?
- How do I know if Python has pandas installed?
- How can I list the contents of a directory in Python?
- How we can bundle multiple python modules?
- How can I get a list of databases and collections on a MongoDB server?
- How can I get the selected value of a drop-down list with jQuery?
- How can I get the list of files in a directory using C/C++?
- How can I get last 4 characters of a string in Python?

Advertisements