'import win32con' on .venv

Hi, there
I want to use ‘import win32con’ code on .venv.
I tried it but I had an import module error.
I can do it on global python env.
But can’t using TouchDesigner on .venv.
Any ideas?

Hey @atsonic

Did you add the .venv site-packages folder to your search path from within TouchDesigner ?

Best,
Michel

Hi @JetXS
Yes. I add the .venv site-packages folder to my search path from within TouchDesigner,but it won’t work.

I did below

  1. create a .venv on command prompt.
  2. activate the .venv
  3. pip install pywin32 to site-packages folder in the .venv.
  4. add the .venv site-packages folder to my search path from within TouchDesigner using text DAT
  5. then import win32con using another text DAT.< this makes ‘no module error’

[ my env ]
Python ver 3.11
pywin32 ver 305
TouchDesigner 2022.26590