Differences Between the Remote and Local Environments
Typically, your apps that run on Beam will be using packages that you don’t have installed locally.If your Beam app uses packages that aren’t installed locally, you’ll need to ensure your Python interpreter doesn’t try to load these packages locally.
An alternative to using inline imports is to use a special check called env.is_remote() to conditionally import packages only when inside the remote environment.