"No module named mel2py" Pymel installed?


#1

I’m trying to use Maya 2016 pymel to convert a Mel file to Python (or at least see the results).

However I can’t even get mel2py to import.

This is the first time I’ve used pymel. I see the files in the Maya default install dir, so what could be up?

Neither of these work:


import pymel
import pymel.mel2py

#2

Try this instead…

from pymel.tools import mel2py

But I have to say, I’m not a big fan of those conversions. In my opinion you are better off rewriting your code yourself. The time you may save with the auto conversion will often be wasted later when you are debugging things that were lost in translation.

David


#3

Thanks djx, that did it!

You’re right, there is some wonkiness to the conversion. Nice of it to convert a lot of the command flags at least!