About 943,000 results
Open links in new tab
  1. Where are the python modules stored? - Stack Overflow

    Dec 24, 2015 · Where is the module code actually stored on my machine? Usually in /lib/site-packages in your Python folder. (At least, on Windows.) You can use sys.path to find out what directories are searched for modules. If you want the location of a specific module, import it and look at it's __file__ attribute. Works for most of them.

  2. How to locate a particular module in Python? - GeeksforGeeks

    Sep 14, 2022 · For a pure Python module, we can locate its source by module_name. __file__. This will return the location where the module’s .py file exists. To get the directory we can use os.path.dirname () method in OS module. For example, if we want to know the location of the ‘random’ module using this method we will type the following in the ...

  3. Where Does Python Look for Modules? - GeeksforGeeks

    Aug 20, 2021 · Modules are simply a python .py file from which we can use functions, classes, variables in another file. To use these things in another file we need to first import that module in that file and then we can use them. Modules can exist in various directories. In this article, we will discuss where does python looks for modules.

  4. Navigating Python Modules: 3 Ways to Find their Locations

    May 12, 2023 · In Python, there are three easy methods to find the location of module sources. The first is using the ‘ file ‘ attribute, which gives the absolute path of the current module. The second method involves the ‘help’ function, which provides comprehensive information about a module, including its location.

  5. How do I get a list of locally installed Python modules?

    Long answer: the Adam's approach is based on the pip - package management system used to install and manage software packages written in Python and a result …

  6. Solved: Top 12 Ways to Locate Python Modules on Your System

    Nov 6, 2024 · Discover how to find the location of Python modules on your system. Explore various methods tailored for different environments like Windows, Linux, and more.

  7. python - How to retrieve a module's path? - Stack Overflow

    Oct 29, 2008 · There is inspect module in python. The inspect module provides several useful functions to help get information about live objects such as modules, classes, methods, functions, tracebacks, frame objects, and code objects.

  8. Python: Module Path – List Modules & Get Locations - ShellHacks

    Jan 25, 2022 · Let’s say you have a Python module somehow installed on a computer, so you can “import” it, and you want to find a path to this module to check its source files. In this note i am showing how to list all the locally installed Python modules and how to find the paths to these Python modules.

  9. Finding the Python Path: A Comprehensive Guide - CodeRivers

    Apr 22, 2025 · In the world of Python programming, knowing how to find the Python path is crucial. The Python path determines where Python looks for modules, packages, and other resources. Whether you are a beginner setting up your development environment or an experienced developer troubleshooting module import issues, understanding how to find and manage the Python path is essential. This blog post will ...

  10. 6. ModulesPython 3.13.3 documentation

    5 days ago · A module is a file containing Python definitions and statements. The file name is the module name with the suffix .py appended. Within a module, the module’s name (as a string) is available as the value of the global variable __name__.

Refresh