Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Peter_23
Helper V
Helper V

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.. 🙂

 

Peter_23_0-1756957956138.png

 

 

 

 

thanks in advance

 

 

1 ACCEPTED SOLUTION
v-pnaroju-msft
Community Support
Community 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 either
a. 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.

 

View solution in original post

2 REPLIES 2
v-pnaroju-msft
Community Support
Community 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 either
a. 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.

 

ok @v-pnaroju-msft  thank you

Helpful resources

Announcements
September Fabric Update Carousel

Fabric Monthly Update - September 2025

Check out the September 2025 Fabric update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors
Top Kudoed Authors