How to ENABLE_QT5_COMPAT

Hello, I have a presentation in a conference to do next weekend about using Anki in vocab learning and I was planning to do a live example.

Sadly the addon Batch Download Pictures From Google Images is suddenly not working, and was a part of my plan to show it live. There is a temporary solution that I could use:

Temporary workarounds
Users with add-ons that the add-on author has not updated yet can either switch to the Qt5 version of Anki, or temporarily set an environment variable ENABLE_QT5_COMPAT to 1 to have Anki install the previous compatibility code. In an early 2024 update, ENABLE_QT5_COMPAT will be removed, so this is not a long term solution.

I am sorry but have no idea how to even start with this. How could I do this change?
I am a short of advanced user but with this thing I really dont know.
Thank you

If you’re on Windows, here’s an example of how to do this: Text Size - Anki Manual

On macOS, a similar script should work (using bash/zsh instead of bat)

2 Likes

I asked ChatGPT (https://chatgpt.org/chat) how to do it on Windows.

Q: How to set an environment variable ENABLE_QT5_COMPAT to 1 on Windows?

A: To set an environment variable ENABLE_QT5_COMPAT to 1 on Windows, you can follow these steps:

  1. Open the Start menu and search for “Environment Variables”.
  2. Click on “Edit the system environment variables”.
  3. In the System Properties window, click on the “Environment Variables” button.
  4. In the Environment Variables window, you’ll see two sections: User variables for your user account and System variables for all users on the Windows machine.
  5. If you want to set the variable for your user account only, scroll down to the “User variables” section and click on “New”.
    If you want the variable to be available for all users on the system, scroll down to the “System variables” section and click on “New”.
  6. In the “Variable name” field, enter “ENABLE_QT5_COMPAT”.
  7. In the “Variable value” field, enter “1”.
  8. Click “OK” to save the changes.
  9. Depending on where you edited the variable (User or System variables), you may need to restart your computer or open a new command prompt for the changes to take effect.

Now, the environment variable ENABLE_QT5_COMPAT should be set to 1 on your Windows system.

It looks like a good answer, but, just in case, the add-on was recently patched to work with Anki 23.10 Qt6 and ENABLE_QT5_COMPAT is no longer required.

2 Likes

The simplest solution for now is to use the -qt5 version of Anki instead of the -qt6 version.

1 Like

Thank you! did not noticed that this is directly market in the download version so it was easily solved.
Best regards Mr. Elmes :wave:

Thank you! Well, I’m definitely asking gpt next time beforehand. :wave: