Asked By – Omer Dagan
site-packages is mentioned in various Python related articles. What is it? How to use it?
Now we will see solution for issue: What is python’s site-packages directory?
site-packages is the target directory of manually built Python packages. When you build and install Python packages from source (using distutils, probably by executing
python setup.py install), you will find the installed modules in
site-packages by default.
There are standard locations:
- Unix (pure)1:
- Unix (non-pure):
1 Pure means that the module uses only Python code. Non-pure can contain C/C++ code as well.
site-packages is by default part of the Python search path, so modules installed there can be imported easily afterwards.