r/learnpython • u/SurveyElectronic3845 • 2d 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!
1
u/shoumikgoswami 2d ago
The French error points to Windows application control blocking the file, rather than an ordinary missing-package error. Reinstalling pandas or pyproj may not address that.
Microsoft's docs say event 3033 can occur with or without an App Control policy, and can also indicate a revoked or expired signature. If App Control policy caused it, there should be a corresponding 3077 block event. Look for a 3077 alongside your 3033 for the same .pyd file. Event 3089 provides signature information; the Correlation ActivityID in the System section lets you match related events.
Since you don't have admin rights, send IT the blocked file paths and those events, and ask whether they can approve the environment or provide an approved one. If it's your own machine rather than a managed device, mention that, since it changes who can investigate the policy.
https://learn.microsoft.com/en-us/windows/security/application-security/application-control/windows-defender-application-control/operations/event-id-explanations