See to setup development environment: Development Setup
import os
import sys
import site
os.environ['TP_DCC_PIPELINE_ROOT_DIRECTORY'] = r'E:\tools\dev\tp-dcc'
# This should point to the site-packages of the virtual environment for the
# specific DCC application you are working with, e.g., Maya 2026, MoBu 2026, etc.
os.environ['TP_DCC_PIPELINE_SITE_PACKAGES'] = r'E:\tools\dev\tp-dcc\envs\maya2026\Lib\site-packages'
site.addsitedir(os.environ['TP_DCC_PIPELINE_SITE_PACKAGES'])
try:
pkm.shutdown()
except Exception:
pass
from tp import bootstrap
pkm = bootstrap.init()
This code will initialize TP DCC bootstrap and will load all the packages. After the first run, the call to
pkm.shutdown()
will ensure all the packages are properly unloaded and related code is reloaded to streamline development workflow.