I’m trying to import then pandas module which requires Numpy 1.12 or greater. I have Numpy 1.16 on laptops python path, but the version TD comes installed with is 1.11.
Could you be more specific as to how to do that? sys.path just yields a list of various python related folders, along with the site packages TD uses - it doesn’t seem to go to the module level.
see the chapter “Importing Modules” on the “introduction to Python Tutorial” page:
(more specifically the last paragraph titled “Overriding built in modules”) docs.derivative.ca/Introduction … ng_Modules
That article was what I was referring to in my original post - I read it, but I’m still confused as to how to actually implement it.
I ran
sys.path.remove('C:\\Program Files\\Derivative\\TouchDesigner099\\bin\\lib\\site-packages')
and got a value error saying
ValueError: list.remove(x): x not in list
I printed out sys.path and sure enough the site-packages path wasn’t in there - which confused me even more. If my the default TD sitepackages path isn’t in sys.path, then how is TD importing the default modules like cv2 and numpy?
I still got this problem, I’m struggling to override the Numpy 1.16.2 from TD (last Official built 2021.16410) with a more recent version of Numpy? I tried so many things without success.
But when I import numpy it’s always the Touchdesigner’s 1.16.2 version and not the 1.21.5 in my custom site-package directory.
The addition of new modules is working, but not the overriding!
(I worked around the problem in a dirty way on mac by copying the directory of the recent version of numpy directly into the original ToucheDesigner “site-packages” directory, but it doesn’t work on PC)
I even tried to remove every predefined path in sys.path and add mine, but it still does not override the old numpy (it’s like any change to sys.path is not taken into account for override).