I’m having trouble to import some python module in TD, No problem to import from the python shell. I have noticed that with module with an init.py in the folder. I don’t know if that is the reason ??? but look like the structure is different with a .egg folder with 2 folder inside (EGG-INFO and the module folder).
I have tried to set the path to the .egg folder and the sub folder with no success.
Yes, I reviewed all steps mentioned there.
The package is available in the Python Shell.
You need the setuptools or its python 3 counterpart : distribute. to install the package.
If I got it, it is to manage dependencies during the install process.
It create a folder with a .egg extension
C:\Python32\Lib\site-packages\twitter-1.9.2-py3.2.egg
with 2 folders inside : EGG-INFO and Twitter.
I think my problem is to set the right path in TD
I tried with the parent foder.egg and the sub folder with no success. (with both TD 32 and 64bit).
-Open a prompt command into the folder containing the distribute script:
-SHIFT-Right Click inside the folder (on windows)
-Open Windows Console
-Run the distribute-setup script:
C:\Python32\python.exe distribute-setup.py
→ Setup tools are downloaded and then installed in your default python installation path.
Install the needed python module
-Go to the Default python installation folder then inside the Scripts folder:
C:\Python32\Scripts
You should see the easy_install application.
If not something got wrong in the previous steps.
-Open a console windows into the Scripts folder
-Shift-Right Click Open Console
-Download the needed module:
easy_install name_of_the_module
Example:
easy_install twitter
Configure Touch Designer to work with the module
In Touch Designer, create a python text DAT with the following code and run it:
import sys
mypath = "C:/Python32/Lib/site-packages"
if mypath not in sys.path:
sys.path.append(mypath)
mypath = "C:/Python32/Lib/site-packages/name_of_module.egg"
if mypath not in sys.path:
sys.path.append(mypath)