Forum Discussion
P_work
7 months agoHelper I
Python 3.11 notebook slow startup when using builtin import
Python 3.11 notebook is slow to startup when using builtin import. If builtin py file imports are not used, the notebook is orders of magnitude faster startup. Are there no workarounds to handle thi...
deborshi_nag
7 months agoSuper User
Hello P_work
Use Fabric Environments item to install and govern Python libraries (including your own custom modules) for notebooks. This process gives you repeatability, version control, and attach-at-once behavior across notebooks/Spark job definitions. Keep %pip inline installs for ad‑hoc or exploratory work, not for anything you want to be reliable or reusable.
Use the following rules for custom libraries -
1. Team‑wide, repeatable libraries for notebooks/Jobs
Create a Fabric Environment, add libraries (PyPI/conda, private feed, or custom wheels), and attach it (or set as Workspace default).
2. Quick experiments in a single notebook session
Use %pip install ... in a cell.
3. Your own modules (internal utilities)
Package as a Wheel (.whl) and add it as a custom library in the Environment.
Please refer to the following Microsoft doc reference
Hope this helps - please appreciate leaving a Kudos or accepting as a Solution!
P_work
7 months agoHelper I
I have implented custom environments add found the startup times to be excessively long as well. This is a known issue from what I have seen in the community and will not alleviate long session startups. When anything other than the default environment is used, especially from pipelines, startup times will be orders of magnitude longer.