adamrehn / conan-ue4cli

Integrate third-party libraries into the Unreal Engine with Conan
https://docs.adamrehn.com/conan-ue4cli/
MIT License
87 stars 20 forks source link

ue4 setroot command gives error #25

Closed sg-12345 closed 9 months ago

sg-12345 commented 9 months ago

Hello, I downloaded Unreal Engine 5.1.1 from the source and followed the Conan UE4 documentation. However, the 'ue4 setroot' command is not working, and it gives the following error.

PS C:\Users\sguney> ue4 setroot C:\Users\sguney\Downloads\UnrealEngine-5.1.1-release\UnrealEngine-5.1.1-release Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "C:\Users\sguney\AppData\Local\Programs\Python\Python312\Scripts\ue4.exe__main.py", line 7, in File "C:\Users\sguney\AppData\Local\Programs\Python\Python312\Lib\site-packages\ue4cli\cli.py", line 206, in main plugins = PluginManager.getPlugins() ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\sguney\AppData\Local\Programs\Python\Python312\Lib\site-packages\ue4cli\PluginManager.py", line 17, in getPlugins entry_point.name: entry_point.load() ^^^^^^^^^^^^^^^^^^ File "C:\Users\sguney\AppData\Local\Programs\Python\Python312\Lib\site-packages\pkg_resources__init__.py", line 2516, in load return self.resolve() ^^^^^^^^^^^^^^ File "C:\Users\sguney\AppData\Local\Programs\Python\Python312\Lib\site-packages\pkg_resources__init.py", line 2522, in resolve module = import__(self.module_name, fromlist=['name'], level=0) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\sguney\AppData\Local\Programs\Python\Python312\Lib\site-packages\conan_ue4cli__init.py", line 1, in from .descriptor import PLUGIN_DESCRIPTOR File "C:\Users\sguney\AppData\Local\Programs\Python\Python312\Lib\site-packages\conan_ue4cli\descriptor.py", line 1, in from .main import main File "C:\Users\sguney\AppData\Local\Programs\Python\Python312\Lib\site-packages\conan_ue4cli\main.py", line 1, in from .commands import boilerplate, build, generate, precompute, sources, update File "C:\Users\sguney\AppData\Local\Programs\Python\Python312\Lib\site-packages\conan_ue4cli\commands__init.py", line 1, in from .boilerplate import boilerplate File "C:\Users\sguney\AppData\Local\Programs\Python\Python312\Lib\site-packages\conan_ue4cli\commands\boilerplate.py", line 1, in from ..common import ConanTools File "C:\Users\sguney\AppData\Local\Programs\Python\Python312\Lib\site-packages\conan_ue4cli\common__init__.py", line 2, in from .ConanTools import ConanTools File "C:\Users\sguney\AppData\Local\Programs\Python\Python312\Lib\site-packages\conan_ue4cli\common\ConanTools.py", line 1, in from conans import tools ImportError: cannot import name 'tools' from 'conans' (C:\Users\sguney\AppData\Local\Programs\Python\Python312\Lib\site-packages\conans\init__.py)

sg-12345 commented 9 months ago

The solution to the above error is that the Conan version should not be 2.0. Currently, conan-ue4cli only supports Conan versions between 1.57 and 1.59. Therefore, check your Conan version with the following command: conan --version. If the version is not within the supported range, you need to update or downgrade Conan accordingly. Python version 3.12 did not work well with it so i needed to use python 3.8 and lower pip version.