dgovil/MLDeform

How to add anaconda/tensorflow to Maya

Closed this issue · 3 comments

Hi Dhruv, I am trying to run your repo but kind of stuck at bringing TensorFlow to Maya.

I first tried to install TensorFlow using mayapy, but using that I was getting attached error
Untitled
It complains when imp.load_module('_pywrap_tensorflow_internal' but _pywrap_tensorflow_internal is present.

Anyway, I followed your advice and install tf2 using anaconda, but now I am not sure how to add anaconda library path to Maya library paths. I am guessing it should be conda/pkgs that I need to reference in Maya, but not sure where. Kindly advice.

OS: Linux/CentOS7
Maya Version: 2020

Hi @dgovil I tried adding PYTHONPATH+=/home/haroon/miniconda2/lib in Maya.env but Maya didn't pick TensorFlow library, I also added init.py in my google folder which is at /home/haroon/.local/lib/python2.7/site-packages/google
Please advise.

As far as I know, Tensorflow has dropped support for Python 2, which makes it incompatible with Maya 2020. The existing python-2 versions may also have other incompatibilities with Maya.

This may work in Maya 2022 when using the Python 3 version but unfortunately I haven't tried it yet since this code base hasn't worked in a while due to the differences in Maya Python support and Tensorflow.

Thanks @dgovil for the suggestion, I switched to Maya 2022, and TensorFlow installed and loaded seamlessly in Maya.
I have also tested your deformer in 2022 with my (Collab) trained model and it loaded without any errors.
I will explore it further with different poses and let you know in case of any questions.

I am closing this issue for now. Thanks again!