adamrehn / ue4-docker

Windows and Linux containers for Unreal Engine 4
https://docs.adamrehn.com/ue4-docker/
MIT License
789 stars 173 forks source link

Imp module not used by Python 3.12 #336

Open Loris94 opened 1 year ago

Loris94 commented 1 year ago

Output of the ue4-docker info command:

ue4-docker version:         0.0.107 (latest available version is 0.0.110)
Operating system:           Windows Server 2022 Datacenter (Build 20348.1787)
Docker daemon version:      24.0.2
NVIDIA Docker supported:    No
Maximum image size:         800GB
Available disk space:       520.8 GiB
Total system memory:        63.91 GiB physical, 35.45 GiB virtual
CPU:                        12 physical, 24 logical (AMD64 Family 25 Model 33 Stepping 0, AuthenticAMD)

Additional details:

No

Issue description:

I'm having problems building the ue4-full for windows. At the step 15/29 it fails with ModuleNotFoundError: No module named 'imp'. This is probably due to the Conan dependency used in the Dockerfile (< 2.0, still using imp module) and the python version downloaded in the build-prerequisites, which now goes to python 3.12. The imp module has been removed in Python 3.12: https://docs.python.org/3.11/library/imp.html

Deprecated since version 3.4, will be removed in version 3.12: The imp module is deprecated in favor of importlib.

My solution for now is to fix the version of the installed python at 3.11 in the build-prerequisites.ps1 since I'm not sure that Conan >=2.0 is supported by ue4-docker.

Here is the full log of my build command:

ue4-buildlog.txt

slonopotamus commented 10 months ago

I believe, the proper way is to fix conan-ue4cli so it works with modern Conan. Pinning Conan to < 2.0 is just a hack, that now causes even more issues.

slonopotamus commented 9 months ago

@adamrehn do you have any plans on modernizing ue4cli/conan-ue4cli? Both have bunch of open issues and are incompatible with modern UE/Python/Conan.

adamrehn commented 9 months ago

I'm currently working on implementing my plan to address the problems with ue4cli and conan-ue4cli, and I'll be making an announcement regarding the status of those projects (and the ue4-full image) once that work is complete.