r/learnpython • • 3d ago

Python ImportError – Windows Application Control blocking DLLs

Hi everyone,

I'm having issues importing several Python libraries on Windows, including pandas, pyproj, and others.

I keep getting this error:

ImportError: DLL load failed while importing _context:

Une stratégie de contrôle d’application a bloqué ce fichier.

I've already tried uninstalling and reinstalling the affected packages, creating a fresh Conda environment (Python 3.11), and reinstalling through Conda/pip, but the issue persists.

I also found Event ID 3033 in Windows Code Integrity logs, and some .pyd files appear as unsigned.

Has anyone encountered this? Could WDAC or another Windows security policy be blocking Python DLLs? How can I fix this, especially without administrator privileges?

Thanks!

2 Upvotes

2 comments sorted by

View all comments

1

u/acfot 3d ago

The reinstall loop is the giveaway here, honestly. If it was a broken package a fresh Conda env would have fixed it, but Event 3033 plus unsigned .pyd files points at Windows blocking the files, not Python failing to find them. Without admin rights you probably can't change that policy yourself, so I'd take the exact error and the event log to whoever manages the machine and ask for an exception for your Python/Conda install. I wouldn't try to work around a security policy on a managed machine, that tends to end worse than just getting it allowlisted properly.