티스토리 뷰
excute 코드
import sys
import os
import platform
def onStart():
user = 'ㅇㅇㅇ' # Update accordingly
condaEnv = 'ㅇㅇ' # Update accordingly
if platform.system() == 'Windows':
if sys.version_info.major >= 3 and sys.version_info.minor >= 8:
"""
Double check all the following paths, it could be that your anaconda 'envs' folder is not in your User folder depending on your conda install settings and conda version.
"""
os.add_dll_directory('C:/Users/'+user+'/.conda/envs/'+condaEnv+'/DLLs')
os.add_dll_directory('C:/Users/'+user+'/.conda/envs/'+condaEnv+'/Library/bin')
else:
"""
Double check all the following paths, it could be that your anaconda 'envs' folder is not in your User folder depending on your conda install settings and conda version.
"""
# Not the most elegant solution, but we need to control load order
os.environ['PATH'] = 'C:/Users/'+user+'/.conda/envs/'+condaEnv+'/DLLs' + os.pathsep + os.environ['PATH']
os.environ['PATH'] = 'C:/Users/'+user+'/.conda/envs/'+condaEnv+'/Library/bin' + os.pathsep + os.environ['PATH']
sys.path = ['C:/Users/'+user+'/.conda/envs/'+condaEnv+'/Lib/site-packages'] + sys.path
else:
"""
MacOS users should include path to .dlybs / MacOS binaries, site-packages
"""
os.environ['PATH'] = '/Users/'+user+'/opt/.conda/envs/'+condaEnv+'/lib' + os.pathsep + os.environ['PATH']
os.environ['PATH'] = '/Users/'+user+'/opt/.conda/envs/'+condaEnv+'/bin' + os.pathsep + os.environ['PATH']
# The following path might need editing (python3.9) based on the python version used with conda
sys.path = ['/Users/'+user+'/opt/miniconda3/envs/'+condaEnv+'/lib/python3.9/site-packages'] + sys.path
return
return
간편한 COMP 파이썬 env 연결해주는 Base 생성
1.base 생성
그안에 excute 넣어주기
밖 base에서
커스텀 페이지 하나만들고
그안에 파라미터
str : username
str : envname
pulse : reset
이러고 base 안에 들어가서 : parameter node
excute : start pulse에 연결
def onStart():
user = op('parameter1')[1,1]
condaEnv = op('parameter1')[2,1]
로 수정
td_pip
https://derivative.ca/community-post/asset/td-pip/63077
TD PIP
Working with external libraries can be super cumbersome. You first have to install python with pip, download the library import it into your project and append the project folder. All very unconvinient. And what happens when you move the project? Are all t
derivative.ca
https://olib.amb-service.net/component/td-pip
TD PIP by AlphaMoonbase
Get dynamic python modules.<br> View TD PIP and many other TouchDesigner components in the Olib!
olib.amb-service.net
다운로드 파일.
drag&drop
코드 : read me
Get dynamic python modules.
To install and use a package, instead of running
import my_module
my_module = op('td_pip').ImportModule( "my_module",
pipPackageName = "my_module_on_pip,
additionalSettings = [list of additional arguments] )
i.E.
import socketio
socketio = op("td_pip").ImportModule( "socketio", pipPackageName = "python-socketio[client]" )
To just install a package run
op('td_pip').InstallPackage( package_name )
To check if a package is installed run
op("td_pip").TestModule("TestModule")
To force an upgrade on a Package run
op("td_pip").UpgradePackage( "TestModule" )
설치 자동으로 됨.와우
이런식으로 바로바로 설치가능함.
'TouchDesigner' 카테고리의 다른 글
Touchdesigner_ AI model 불러오기 (.pth) (0) | 2024.03.17 |
---|---|
Touchdesigner _ StableDiffusion :Comfy UI (0) | 2024.03.16 |
stablediffusion_touchdesigner (1) | 2024.02.24 |
터치디자이너 : Web Client DAT : API 연결 (NSRDB 데이터) (0) | 2024.02.23 |
터치디자이너에 온도 HP 센서 생체신호 받아오기(Arduino) (0) | 2024.02.22 |
- Total
- Today
- Yesterday
- RNN
- three.js
- oculuspro
- TouchDesigner
- MQTT
- emotive eeg
- Express
- colab
- motor controll
- Python
- ardity
- VR
- CNC
- Unity
- docker
- Midjourney
- AI
- sequelize
- imgtoimg
- unity 360
- 후디니
- opencv
- DeepLeaning
- Java
- 라즈베리파이
- Arduino
- 유니티플러그인
- node.js
- 유니티
- houdini
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |