Dependencies

All node dependencies are automatically installed based on the import statements in the code. This applies to any libraries available on pypi.org, with the latest versions being used by default.

Custom pip commands are also supported, enabling the specification of custom library versions.

Things to remember when using Python libraries

  1. Memory size: If the node has limited memory, some libraries may take longer to import. To ensure faster initialization of libraries, allocate at least 1024MB of memory.

  2. Library naming: A small number of libraries have import names that differ from their actual names on PyPI, leading to import errors. In these cases, use a custom pip command with the correct library name. The following is a list of libraries that will be automatically handled, even if they use different aliases:

library_aliases = {
    "bs4": "beautifulsoup4",
    "PIL": "pillow",
    "np": "numpy",
    "pd": "pandas",
    "sns": "seaborn",
    "cv2": "opencv-python",
    "tf": "tensorflow",
    "jwt": "pyjwt", 
    "mpl": "matplotlib",
    "skimage": "scikit-image",
    "yaml": "PyYAML",
    "json": "simplejson",
    "sp": "scipy",
    "sklearn": "scikit-learn",
    "dateutil": "python-dateutil",
    "serial": "pyserial",
    "usb": "pyusb",
    "pygame": "pygame-ce",
    "multipart": "python-multipart",
    "google.auth": "google-auth",
    "ffmpeg": "python-ffmpeg",
    "Crypto": "pycryptodome",
    "Cryptodome": "pycryptodomex",
    "qtpy": "QtPy",
    "etree": "lxml",
    "Bio": "biopython",
    "cython": "Cython",
    "twisted": "Twisted"
    //please email us with additional suggestions if needed: info@trudo.ai
}

Last updated