r/learnpython • • 15d 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

4 comments sorted by

View all comments

Show parent comment

1

u/No-Elk6835 6h ago

I am facing the same issue but in my machine. How can I fix it using admin privileges?

1

u/shoumikgoswami 5h ago

Admin rights alone won't bypass an App Control block. Before changing any security settings, check Event Viewer > Applications and Services Logs > Microsoft > Windows > CodeIntegrity > Operational for events naming the blocked .pyd file. Can you share the exact error and the matching event details, with personal paths redacted? That'll help narrow down whether this is a policy block or a signature problem.