Include dist-info folders for python packages in TD installation directory

Please would it be possible to include dist-info folders for python packages in TD installation directory? I am not entirely sure why, but these folders are missing. Without them it isn’t possible to work with TD’s site-packages in pip. Is there some reason why they aren’t included?

This command produces no output:

>pip list --path C:\Program Files\Derivative\TouchDesigner.2022.35280\bin\Lib\site-packages

For example numpy package in TD site-packages should have also numpy-1.20.3.dist-info placed there (with at least minimal structure which would allow recognition by pip).

Having ability to make TD’s packages visible in pip would be great in case user wants to create venv with some additional python packages to be used in TD, but don’t want to install duplicates of dependencies - and rather use the ones already present in TD’s packages.

Simple example - lets say I would like to upgrade opencv to latest version while keeping numpy at the version which is present in TD by default.


(venv)>set "PYTHONPATH=C:\Program Files\Derivative\TouchDesigner.2022.35280\bin\Lib\site-packages"

(venv)>pip install opencv-python

This way I will install latest opencv in my venv, but since numpy dependency is already satisfied by numpy package present in TD’s site-packages, there is no need to install its duplicate in my venv. Now I can include my venv in TD, use just the new opencv and rest assured I am still using default numpy version. This is of course very simple example, but with multiple dependencies it could make these situations much easier - especially when TD will gradually increase count of its built-in python packages.

One could probably create dist-info folders manually in order to enable such pip workflow, but with every TD installation it would have to be re-generated which isn’t ideal. Thanks.

Hey @monty_python

I’ve logged this to be discussed internally.


1 Like

Thanks. Fore more information feel free to take a look at this:
Here @jtt describes his workflow with external python packages in Houdini - which I am trying to replicate in TD. :slight_smile: