

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
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 Questions & Answers
- 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?
- Where are static variables stored in C/C++?
- How (where) are the elements of an array stored in memory?
- What are the best practices to organize Python modules?
- What are Python modules for date manipulation?
- What are the most useful Python modules from the standard library?
- What are the differences between json and simplejson Python modules?
- What are the modules required for CGI programming in Python?
- Where objects, methods and variables are stored in memory in Java?
- What are Perl Modules?
- Where is VKORG stored in SAP
- What are common practices for modifying Python modules?
Advertisements