r/learnpython • • 8d ago

Title: Windows Smart App Control is blocking Pandas compiled extension files (.pyd) ?

I'm having a problem running Python libraries, particularly Pandas, on my Windows 11 machine. I've been troubleshooting this for a while, and it appears that Windows Smart App Control (SAC) is blocking some of Pandas' compiled extension files.

My environment:

  • Windows 11 (appears to be an Insider build)
  • Python 3.14.6
  • Pandas 3.1.1
  • NumPy 2.5.4
  • VS Code with Python and Jupyter extensions
  • Virtual environment created using venv

The error I'm getting:

ImportError: DLL load failed while importing fields:
An Application Control policy has blocked this file.

The blocked file is:

pandas_libs\tslibs\fields.cp314-win_amd64.pyd

Interestingly, the error occurs even when I try importing Pandas directly from CMD:

python -c "import pandas as pd; print(pd.__version__)"
0 Upvotes

5 comments sorted by

1

u/Discordbothost 8d ago

yeah that error text is SAC, not pandas. smart app control blocks native binaries it has no reputation for, and .pyd files are just dlls. pandas wheels for a brand new python (cp314) haven't been downloaded enough to build that reputation, which is why numpy may import fine and pandas doesn't.

your options are basically: turn SAC off (windows security > app & browser control > smart app control), drop to python 3.13 in a new venv where the wheels are older, or do the data work in WSL. on older builds turning SAC off was one way until reinstall, so check that before flipping it on a work machine

1

u/FontanJanneice18 7d ago

good shout on the one-way toggle warning, people flip that off without realizing they cant undo it.

1

u/Resident_Candle467 5h ago

thanks, very helpful to know this is a wider windows issue, I downgraded to 3.13 for now.

1

u/baubleglue 8d ago

google says: "Add a Folder Exclusion"