Libraries need to be installed within both your deployment build and your execution environment
What Prefect packages for you, though are your custom modules (helper functions, custom code, SQL scripts, configuration files etc ) which are present in your root directory