Windows Smart App Control blocks PsychoPy Standalone and PsychoPy Studio 2026.2.4

Hello PsychoPy developers,

I would like to report an issue that I encountered while trying to use PsychoPy on my personal Windows 11 computer. I previously had an older version of PsychoPy installed. After updating it, the application stopped launching. After investigating the problem, I discovered that Windows Smart App Control was preventing PsychoPy from loading some of its DLL files.

1. PsychoPy Standalone

The application fails to start with the following error:

ImportError: DLL load failed while importing _core:
Un criterio di controllo dell'applicazione ha bloccato il file.

Windows Event Viewer (CodeIntegrity → Operational, Event ID 3077) identifies the blocked file as:

C:\Program Files\PsychoPy\Lib\site-packages\wx\wxbase32u_vc140_x64.dll

The associated policy ID is:

0283ac0f-fff1-49ae-ada1-8a933130cad6

2. PsychoPy Studio 2026.2.4

I also installed PsychoPy Studio 2026.2.4, hoping that the newer application would work.

The Builder interface opens, but the Components panel remains stuck on “Loading Components…” and the following error occurs:

ImportError: DLL load failed while importing _socket:
Un criterio di controllo dell'applicazione ha bloccato il file.

The traceback shows that the failure occurs while importing Python’s socket module, using CPython 3.11.13 installed through uv.

Studio also displays:

Failed setup: Error invoking remote method
'python.liaison.start': reply was never sent

3. Windows security configuration

I checked the active Windows policies using:

citool.exe -lp

The results confirmed:

Policy: VerifiedAndReputableDesktop
Policy ID: 0283ac0f-fff1-49ae-ada1-8a933130cad6
Currently enforced: true

This policy ID matches the CodeIntegrity event that blocked the wxPython DLL in PsychoPy Standalone.

Smart App Control is enabled on my personal computer. I would prefer not to disable this Windows security feature just to run PsychoPy.

Could the PsychoPy team investigate compatibility with Windows Smart App Control, particularly the signing or reputation requirements for bundled DLLs and Python dependencies?

Thank you for your work on PsychoPy!

This is interesting. To date, code-signing the installer exe file was sufficient for Windows to be happy, but it seems we now need to sign each file within the application.

For the Standalone distribution I think we’ll be able to code-sign each dll file before packaging so I think this will be fine.

For Studio this could be more of an issue because we’re allowing the libraries to install and update after the main installer has finished. That’s great for allowing distinct environments for each python version installed (for useVersion) but it looks like it’s going to create new issues if the providers of the dependencies haven’t been signing their libs.

We’ll have a look and hopefully we can replicate the issue on a machine here then go back to the authors of the libs and encourage them to do so

Thanks,
Jon

I’ve now been able to replicate this on my machine (I couldn’t at first, but trying again today it just started happening, I think it probably just needed to reboot for enabling WSAC to take effect) so I’ve been able to find a solution!

The root of the problem as you say is that the Python interpreter installed by uv doesn’t have signed DLL’s. This was fixed in uv version 0.12.12, but if you installed an interpreter with an older version then uv will continue using it even after an update.

Both of these things we’ll address in 2027.1.0; I think this fail is detectable so we can catch it and update everything needed for you. To fix this manually in the meantime, there’s two things you need to do:

Update the version of uv used by PsychoPy Studio

To do this, go to the 0.12.12 release of UV on GitHub and from the list of downloads at the bottom, pick the one matching your machine, if you know what architecture you’re on.

If you don't know what architecture you're on...

Open the Command Prompt app and type the following, then press Enter:

reg query "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v PROCESSOR_ARCHITECTURE

it’ll give you an output like this:
image
The bit I’ve got selected in that screenshot is the relevant part which tells you which file you’ll need. Download the file matching this value from below:

Once you’ve got a zip file, extract it and copy the 3 .exe files inside it to:

%AppData%/psychopy4/.uv

There will be files already there; this is the older version of uv, so delete and replace it with the files you just downloaded.

Tell uv to reinstall Python

Open the Command Prompt app and type in the following, then press Enter:

%AppData%/psychopy4/.uv/uv.exe python install 3.11 --force

This will re-download Python 3.11; this time getting the newer, signed version which doesn’t get blocked by Windows Smart App Control. If you’re running experiments in older versions using Use Version, you’ll also need to do the same for Python 3.10 and Python 3.8 (it’s the same command, just replace 3.11 with 3.10 or 3.8)

Great news Todd.

I was also thinking more on my comment that “For the Standalone distribution I think we’ll be able to code-sign each dll file before packaging” and I think this isn’t a good idea. It would mean us taking responsibility for something that the original provider hasn’t signed. If the wxPython team don’t sign their library, for instance, it isn’t our place to sign it for them if we can’t, ourselves confirm that it came from them.

Basically, the system is designed by Microsoft to prevent a supply-chain attack, but the solution I propose there doesn’t solve it, it just moves the location that the supply chain attack would potentially occur. The real solution is that we need to make sure all the dependencies in the app are signed by their original provider at source.

In the meantime, if you need this it sounds like you should be able to get up and running with Studio, as Todd points out :backhand_index_pointing_up:

Best wishes,
Jon

A few corrections to this from further experimenting:

  • I think you actually need to include another flag --reinstall, otherwise it only replaces the cache and not the installer itself
  • If you don’t specify a Python version, it will automatically detect 3.8 and 3.10 Python and replace those, so you don’t need to worry about doing them manually

So the command above should actually be:

%AppData%/psychopy4/.uv/uv.exe python install --reinstall --force

and can be run just the once.

Additionally, virtual environments created with the unsigned executable seem to be blocked even after the executable has been replaced, so you’ll need to also go to:

%AppData%/psychopy4

and delete the .python folder, meaning that Studio will do all its Python setup again the next time you launch it (this time using the signed executables you installed via the steps above)