> For the complete documentation index, see [llms.txt](https://docs.zerve.ai/guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zerve.ai/guide/notebook-view/global-imports.md).

# Global Imports

## How to set global import commands

Once a package is imported in Global Imports, it can be used in any block in the Notebook

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIQKNeqjEeOp9UwUcB9R9%2Fuploads%2FIcvLrbeK03Uj0t5qv0ah%2FScreen%20Recording%202025-11-26%20at%2011.21.39%E2%80%AFAM.mp4?alt=media&token=d71344e7-053f-4c4b-a51e-afaf98c898bf>" %}

## How to set local, block-level import commands

For larger packages like pytorch - which are required to be run only on specific blocks - we can use block level imports.&#x20;

As seen in the screenshot below, torch wasn't imported globally and at a block level. The first block imports torch and runs, but the second block gives an error as torch wasn't imported locally. &#x20;

<figure><img src="/files/OfgrLoVY0ayoaz0LcoCR" alt=""><figcaption></figcaption></figure>
