Forum Discussion
Is %pip install safe for a Python notebook used in a pipeline?
- 5 months ago
Hi MR
Yes, Python notebooks don't support environments yet. And inline %pip install is the officially recommended best practice now.
Please see the documentation:
You can use %pip and %conda commands for inline installations, the commands support both public libraries and customized libraries.
For customized libraries, you can upload the lib files to the Built-in resources folder. We support multiple types of libraries, including formats such as Wheel (.whl), JAR (.jar), DLL (.dll), and Python (.py). Just try drag&drop to the file and the code snippet is generated automatically.
The link to it:
And one more point regarding driver/worker. Python Notebook's architecture is much simplier than Spark notebook, it is their pro. They don't have driver/worker, that's why they use 2 VCores per time comparing to 8+ for Spark notebooks. So, the issue with spreading installation accross drivers/workers should not be an issue.
I hope this helped! If it answered your question, please mark it as a Solution so others with the same issue can find it easily. Kudos are also always appreciated!
BR, Yurri
Hi mrbartuss , hope you are doing great. May we know if your issue is solved or if you are still experiencing difficulties. Please share the details as it will help the community, especially others with similar issues.