Python fails on first line with : No module named unreal_engine

I am trying to follow this tutorial UnrealEnginePython/ at master · 20tab/UnrealEnginePython · GitHub
in order to import mixamo characters and animations (a site that allows rigging your character and free animations), but I am failing at the first hurdle.

Im not entirely sure entirely sure if I need it for all retargeting, or if it is just needed for animations and characters which require root motion. But I am given to understanding that having root as the first bone and not hips would be a good thing. The mixamo characters come with hips as the first bone.I havent actually tried retargeting the animations yet as am missing the root bone.
I think I want this so I can use the mixamo animations with my characters and so that I can apply unreal animations to mixamo imported characters.

Anyway I am trying to follow “Step 2: generating a new skeleton”

I have enabled the “python editor script” plugin and restarted my project (restarted the computer too and started unreal up as admin too).
But when I run it from the “execute python script” on the file menu or from the Python drop down on the output log, it fails.

Running from the The file menu :- “execute python script” gives more error details, but basically falls over on the first line.

LogPython: Error: import unreal_engine as ue
LogPython: Error: ImportError: No module named unreal_engine

I am fairly new to python and this is my first attempt at doing anything in unreal with it.

From some other post it said that unreal engine was already there and so didnt need to be imported or something. What it didnt say was what you would do to make it work !

Also I note he his using python 3.6 and I guess the “python editor script” plugin is some sort of lower version.

P.S. I have a python37 folder on my computer. I opened up a powershell in its directory and ran the python script from there, and got the same sort of error : ModuleNotFoundError no module named “unreal_engine”.

Also I am given to understand that there is some sort of python built in to unreal as well as the “python editor script”" plugin, but I have no idea how to access it.

So what do I need to do to get this script to work ( preferably with the “python script editor” plugin ). Or did something change in the engine and I no longer need a root bone for retargeting? I am using unreal 4.24


Hello MajorTom,

import unreal as ue

I´m not quite sure, but the one you´re using is a previous version of the wrapper.

Hope it helps.

Thanks for our reply Lolopez. That fixed the first line, it then failed on the second line with unreal.classes. ImportError: No module named classes

Looking more closely at the website associated with the tutorial and searching the web I found that it is for “UnrealEnginePython” , which apparently another more feature rich version of python created by 20tab.

I quote from the website “Currently (as april 2020) the project is on hold: between 2016 and 2018 20tab invested lot of resources in it but unfortunately epic (during 2018) decided to suddenly release its own implementation and the request made for a megagrant in 2019 by the original plugin author was rejected too.”
So I think epic made their own python plugin and sidelined the 20tab python plugin.

Also “The plugin should work up to unreal engine version 4.23 and there are forks/pull requests for 4.24.”

Im not quite sure what fork/ pull request are but I could only find a binary for 4.22, so I guess this tut requires their version of python, which might explain why I couldnt get it to work with the “python script editor” plugin.

I just want something simple that works, and this route sounds like its probably too tricky for me !

I might have to invest in the mixamo retargeting asset Mixamo Animation Retargeting in Code Plugins - UE Marketplace.

For whats its worth I sort of added a root bone after mixamo and added materials to the meshes in blender (I had to add the materials both before and after sending to mixamo (Mixamo splits the materials into meshes,so you have to add a material to each mesh)). Then I seemed to be able to retarget a mixamo animation without the root bone to the skeleton with the root bone, though it seemed to need to update the skeleton, but I am not sure what it did to it !

Hey i was using tensorflow in my python program but when i tried to execute it in ue4 it keeps showing this error ModuleNotFoundError do you know how to resolve it?

As i can guess that il’ll have to install tensorflow in ue4 but i dont know how to do it.
Please help