Forum Discussion
Custom enviroment notebook
Hi community, I have a custom R notebook development by external users, but then notebook install packages which are not available in "Built-in libraries" (R), if it runs in workspace its works fine, (the notebook download and install the packages).
the subject is the libraries are used in several notebooks, In the notebook there is option called it "enviroment" so I understand is possible to create a new enviroment with the libraries "used in the notebook"; so L try to create a new enviroment with custom libraries then the user in the notebook it'll the new enviroment (donΒ΄t install again π )
My questions are:
1.- is this possible to create a new enviroment and set as an option in the "enviroment" option inside notebook?
2.- If the last answer is "YES", best practices to configure dependencies between the new libraries and set up?
3.- How to mantaince the new enviroment for futures updates of libraries?
4.- another options are welcome.. π
thanks in advance
Hi Peter_23,
We appreciate your inquiry through the Microsoft Fabric Community Forum.Based on my understanding, the R packages are reinstalling each time because CRAN libraries are not built-in or supported at the Environment level in Fabric. By default, they must be installed per session in the notebook unless we package them into a .tar.gz.We can create and reuse a custom Environment in notebooks but with some limitations:1.For custom R packages (.tar.gz),go to Workspace β Environments β New Environment. Upload the .tar.gz under Custom Libraries. Save and publish the environment. From notebooks, select this environment from the Environment dropdown.2.For CRAN packages, we can eithera. Install inside the notebook with install.packages("dplyr", repos="https://cran.microsoft.com/snapshot/2021-07-16/")b. Bundle them into a .tar.gz and upload to the Environment, same as custom packages.Additionally, kindly find refer the below links:We hope the information provided helps to resolve the issue. Should you have any further queries, kindly feel free to contact the Microsoft Fabric community.Thank you.
2 Replies
- v-pnaroju-msftCommunity Support
Hi Peter_23,
We appreciate your inquiry through the Microsoft Fabric Community Forum.Based on my understanding, the R packages are reinstalling each time because CRAN libraries are not built-in or supported at the Environment level in Fabric. By default, they must be installed per session in the notebook unless we package them into a .tar.gz.We can create and reuse a custom Environment in notebooks but with some limitations:1.For custom R packages (.tar.gz),go to Workspace β Environments β New Environment. Upload the .tar.gz under Custom Libraries. Save and publish the environment. From notebooks, select this environment from the Environment dropdown.2.For CRAN packages, we can eithera. Install inside the notebook with install.packages("dplyr", repos="https://cran.microsoft.com/snapshot/2021-07-16/")b. Bundle them into a .tar.gz and upload to the Environment, same as custom packages.Additionally, kindly find refer the below links:We hope the information provided helps to resolve the issue. Should you have any further queries, kindly feel free to contact the Microsoft Fabric community.Thank you.- Peter_23Advocate V
ok v-pnaroju-msft thank you