Possible Incompatible Versions of numpy Dependencies in Python Foundation Packages and OpenCV Plugins

We recently upgraded our project to UE 5.6. Our project has dependencies on the Python Foundation Packages and OpenCV plugins.

It looks like Python Foundation Packages was updated to depend on numpy 1.26.4 on March 28, 2025 based on the history on GitHub; however, OpenCV still depends on numpy 1.24.4.

If our troubleshooting is correct, this causes the following two lines to be added to the `merged_requirements.txt` file when we execute our asset pipelines:

numpy==1.26.4 ... ... numpy==1.24.4 ...which in turn causes the following error:

[2025-07-18T19:21:29.825Z] [2025.07.18-19.21.29:567][ 0]LogPython: ERROR: Cannot install numpy==1.24.4 and numpy==1.26.4 because these package versions have conflicting dependencies. [2025-07-18T19:21:29.825Z] [2025.07.18-19.21.29:578][ 0]LogPython: [2025-07-18T19:21:29.825Z] [2025.07.18-19.21.29:578][ 0]LogPython: The conflict is caused by: [2025-07-18T19:21:29.825Z] [2025.07.18-19.21.29:578][ 0]LogPython: The user requested numpy==1.26.4 [2025-07-18T19:21:29.825Z] [2025.07.18-19.21.29:578][ 0]LogPython: The user requested numpy==1.24.4 [2025-07-18T19:21:29.825Z] [2025.07.18-19.21.29:578][ 0]LogPython: [2025-07-18T19:21:29.825Z] [2025.07.18-19.21.29:578][ 0]LogPython: To fix this you could try to: [2025-07-18T19:21:29.825Z] [2025.07.18-19.21.29:578][ 0]LogPython: 1. loosen the range of package versions you've specified [2025-07-18T19:21:29.825Z] [2025.07.18-19.21.29:579][ 0]LogPython: 2. remove package versions to allow pip attempt to solve the dependency conflict [2025-07-18T19:21:29.825Z] [2025.07.18-19.21.29:579][ 0]LogPython: [2025-07-18T19:21:29.825Z] [2025.07.18-19.21.29:579][ 0]LogPython: ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts

Does our troubleshooting appear to be correct? If so, do you recommend that we bump the version of the numpy dependency in OpenCV to 1.26.4?

Your troubleshooting is correct, and we apologize for the version conflict that we did not detect during the release. We noticed this error about a month ago and fixed this issue on ue5-main in CL 43694837 ( github Commit 35f8ecb). You can view this commit at:

https://github.com/EpicGames/UnrealEngine/commit/35f8ecb8e070a847808cf81635b64f4c816bfec0

I think your proposed solution will also work to fix the OpenCV and Foundation Packages conflict. You will notice that our solution on ue5 main creates a new PythonMLPackages in addition to the PythonFoundationPackages plugin. This means plugins like OpenCV that do not need the added disk usage or installation time associated with Pytorch will be able to depend on PythonFoundationPackages, while plugins that require Pytorch can depend on PythonMLPackages. This should help avoid version conflicts while keeping install sizes minimal in future releases.