r/AskProgramming • • 25d ago

Python 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 Upvotes

4 comments sorted by

View all comments

1

u/Individual-Flow9158 25d ago

That is the entire point of WDAC, so yes.

1

u/SurveyElectronic3845 24d ago

How can i fix it please ?

1

u/Individual-Flow9158 24d ago

You need to get whoever supplied the machine or whoever has admin rights, to turn off WDAC, or get another dev machine. Or find some other dev environment entirely, that doesn't depend on this machine.

It's a policy/rules/privileges problem, not a technical bug.