Here is a neat trick I learned today, Let suppose you have an environment variable named PYLIBS with a list of a few paths where python libs are stored.what you can do is use python’s site module to add your lib directories as site directories like this:
os.pathsep looks for the sperator whether Windows or *nix environment and depending on what seprator they have the script can be run cross platform. By using the site.addsitedir module, python will treat these directories as normal site-package directories with all the built-in abilities to customize such as sitecustomize module and .pth files. If subdirectories are already organized into packages using __init__.py then they are already ready to be used and imported into Maya right away, or else if the directory has a .py file and no __init__.py just add an empty one.
To add your custom user site-packages directory just append the lines of code or create a new userSetup.py and make sure it is on your PYTHONPATH when you start up
Other Blogs & Pages
Animation & VFX SitesA MUST READ for Ani/VFX Artists
awakened by thoughts,