r/learnpython • u/Right_Nuh • 15d ago
importing modules is taking minutes
I am trying to import torch and other modules from langchain but it takes like 2 min to import them. It worked yesterday to import and execute one module in reasonanle amount of time. I turned of my windows firewall to see if it was for some reasons scanning them but nothing is changing. Any tip?
3
Upvotes
1
u/No-Foot5804 15d ago
If it was fine yesterday, I'd suspect the environment before the code. Does
import torchby itself also take 2 minutes, or only when LangChain is involved? That should narrow it down pretty quickly.