
- Python 3 Basic Tutorial
- Python 3 - Home
- What is New in Python 3
- Python 3 - Overview
- Python 3 - Environment Setup
- Python 3 - Basic Syntax
- Python 3 - Variable Types
- Python 3 - Basic Operators
- Python 3 - Decision Making
- Python 3 - Loops
- Python 3 - Numbers
- Python 3 - Strings
- Python 3 - Lists
- Python 3 - Tuples
- Python 3 - Dictionary
- Python 3 - Date & Time
- Python 3 - Functions
- Python 3 - Modules
- Python 3 - Files I/O
- Python 3 - Exceptions
Where are the python modules stored?
Python Modules are usually stored in /lib/site-packages in your Python folder. If you want to see what directories Python checks when importing modules, you can log the following:
>>> import sys >>> print sys.path ['', 'C:\Python27', 'C:\Python27\Lib\site-packages', 'C:\Python27\Lib', 'C:\Python27\DLLs', 'C:\Python27\Lib\lib-tk', 'C:\Python27\Scripts', 'C:\WINDOWS\SYSTEM32\python27.zip', 'C:\Python27\lib\plat-win', 'C:\Python27\lib\site-packages\win32', 'C:\Python27\lib\site-packages\win32\lib', 'C:\Python27\lib\site-packages\Pythonwin']
You can also list where individual modules being used by a script(say hello.py) reside on the system using the python -v command. For example,
$ python -v hello.py PS C:\Users\Ayush> echo 'import scrapy' > hello.py PS C:\Users\Ayush> python -v hello.py # installing zipimport hook import zipimport # builtin # installed zipimport hook # C:\Python27\Lib\site.pyc matches C:\Python27\Lib\site.py import site # precompiled from C:\Python27\Lib\site.pyc # C:\Python27\Lib\os.pyc matches C:\Python27\Lib\os.py ... ...
- Related Articles
- Where the PowerShell Modules are stored?
- Where are JavaScript variables stored?
- Where are iOS simulator screenshots stored?
- Where are the app cookies stored on the iPhone?
- What are the most interesting Python modules?
- Where are static variables stored in C/C++?
- What are the best practices to organize Python modules?
- How (where) are the elements of an array stored in memory?
- What are Python modules for date manipulation?
- What are the differences between json and simplejson Python modules?
- What are the modules required for CGI programming in Python?
- What are the best Python 2.7 modules for data mining?
- What are common practices for modifying Python modules?
- What are the most useful Python modules from the standard library?
- Where objects, methods and variables are stored in memory in Java?

Advertisements