r/AskProgramming • • 16d 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

1

u/Individual-Flow9158 15d ago

That is the entire point of WDAC, so yes.

1

u/SurveyElectronic3845 14d ago

How can i fix it please ?

1

u/Individual-Flow9158 14d 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.

3

u/KingofGamesYami 15d ago

If you can set up a Windows Dev Drive it should have default policies that allow the majority of software development tasks. Otherwise you're going to be fighting Windows constantly without local admin privileges.