SOLVED: TDPyEnvManager not importing mediapipe

Hi trying to wrap my head around the TDPyEnvManager with a preexisting conda environment.

running the code within my conda env works perfectly from a terminal, but I’m getting an error where I’m unable to import mediapipe using the TD component.

If i try to import mediapipe from the CLI where TDPyEnvManager loads the env it also works

If i try to import mediapipe in the textport or through a DAT, doesnt work

If i understand the manager, I can use it to specify the python version, and all the other libraries, or am i not getting this right?

thanks in advance…

responding to myself here…and updating to see if anyone else has solved this.
Basically I guess that the python interpreter in TD is always stuck at a particular version - whereas one of the strengths of conda is to specify a version of python and build from it. The version of mediapipe i need to use is 3.10 so none of my imports are working…if there’s a way to specify TDs python interpreter, it would be great, but it looks like from some searching its not possible.

Hi @delray

The TDPyEnvManager is purposedly setting the Python environments created through the component to match TD’s own Python version.

While Conda does allow for different Python versions to be set, for the sake of dependency solving, the safe approach is to stick to the same version.

Because of the import order of modules, some issues might occur when a module of an external environment is imported that doesn’t match TD’s version anymore, among other things.

Why can’t you use Mediapipe 3.11 ?

If this is not a possible solution, you might want to run Mediapipe 3.10 in its own standalone python process and feed the data to Touch.

Best,
Michel

Sadly there are no binary files for the mediapipe package for python 3.11. I do have everything working I need with spout + OSC, I just thought there might be a nice way to make this all consolidated with the manager…