티스토리 뷰
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
https://olib.amb-service.net/component/td-pip
다운로드 파일.
drag&drop
코드 : read me
Get dynamic python modules.
Having to handle external python libraries is a thing of the past. This component installs PIP directly in your project and dynamicly downloads and import the libraries in your project.
To install and use a package, instead of running
To install and use a package, instead of running
import my_module
run TD_Pip like this:
my_module = op('td_pip').ImportModule( "my_module",
pipPackageName = "my_module_on_pip,
additionalSettings = [list of additional arguments] )
i.E.
import socketio
becomes
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
링크
TAG
- opencv
- RNN
- colab
- 유니티플러그인
- DeepLeaning
- houdini
- JacobianMatrices
- ardity
- motor controll
- unity 360
- MQTT
- node.js
- sequelize
- TouchDesigner
- three.js
- Express
- 라즈베리파이
- StableDiffusion
- AI
- docker
- emotive eeg
- CNC
- Unity
- VR
- Python
- 유니티
- 후디니
- oculuspro
- Arduino
- Java
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 29 | 30 |
글 보관함