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,
I have followed step number 2 the entire time, but whenever I choose the new environment, I still get the old package versions. The command !pip cache purge does not resolve the issue. Best regards.
Hi Anonymous,
Thank you for reaching out in Microsoft Community Forum.
Please follow below steps to resolve the error;
1. Run the following command to confirm the notebook is using the correct environment, If it still points to the base environment, reattach the new environment.
!which python
2. Close the notebook completely > Reopen it, go to Kernel > Change Environment, select the new environment, and restart the notebook.
3.Check if the correct version is loaded by running:
import transformers
print(transformers.__version__)
If the version is still incorrect, force reinstall it:
!pip install --force-reinstall transformers==4.49.0
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,
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.- Anonymous1 year agoNot applicable
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/activate3.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: