Forum Discussion
Update Built-in libraries in new Environment
- 1 year ago
I have experienced this. It's baffling that nobody suggested this, but unfortunately this page reads like 99.9 of all requests for help with Microsoft I've ever seen. Conda packages override pypy ones. Try adding the packages needed from conda instead of pypy in the environment package area. You should see the option at the top left in the same screen that you posted the screenshot of.
Hi,
When I run the command `!which python` in my own environment, I consistently get the following output:
`/home/trusted-service-user/cluster-env/trident_env/bin/python`
This happens regardless of whether I use my own environment or the default one. I have reattached my own environment multiple times, closed the notebook, restarted the session, etc., but with no changes. It seems I am unable to attach my own environment to the notebook. I have also tried to recreate the environment, but I encountered the same result.
Hi Anonymous,
Thank you for the detailed update. Please follow below steps to resolve the error;
1.Even if you created the environment, it won’t be applied unless you publish it.
Go to Fabric > Environments → Verify your environment is "Published" (not just "Saved").
2.Manually Attach the Environment, Please run the below command
!source /home/trusted-service-user/cluster-env/<your_env_name>/bin/activate
3.Force Reinstall the Library and Verify:
For installation; %pip install --force-reinstall transformers==4.49.0
For Verification;
import transformers
print(transformers.__version__)
Please continue using Microsoft community forum.
If you found this post helpful, please consider marking it as "Accept as Solution" and give it a 'Kudos'. if it was helpful. help other members find it more easily.
Regards,
Pavan.
- Anonymous1 year agoNot applicable
Hi,
The packages are all published:
But I still cant connect to the environment:- Anonymous1 year agoNot applicable
Hi Anonymous,
Thank you for the update and sharing the screenshots.
1. Please check the fabric permissions
Go to Admin Portal > Tenant Settings > Environments → Ensure you have "Create and Manage Environments" permissions.
2.Manually Set Environment in Notebook Metadata
Go to Notebook Settings > Advanced > Metadata → Add
{
"kernel": {
"name": "python3",
"environment": "<your_env_name>"
}
}3.Create a new notebook, select your environment, and verify with below code
!which python
Please continue using Microsoft community forum.
If you found this post helpful, please consider marking it as "Accept as Solution" and give it a 'Kudos'. if it was helpful. help other members find it more easily.
Regards,
Pavan.- Anonymous1 year agoNot applicable
Hi,
We do not see Environments in Tenant Settings, or Advanced in Notebook Settings: