티스토리 뷰
Anaconda - Managing Python Environments and 3rd-Party Libraries in TouchDesigner
Bananaconda - This amazing article picture is brought to you by reddit.com/user/DCLanger Anaconda - Managing python environments and 3rd-party libraries in TouchDesigner It has been quite a few times that I see on the Derivative forum or on social networks
derivative.ca
설정
윈도우
TD 2022.25..
Anaconda
터디를 위한 ENV 만들기
Conda 환경에서 이 버전을 일치시킬 수 있도록 현재 사용 중인 Python TouchDesigner의 버전을 알고 싶습니다.
그렇게 하려면 TouchDesigner에서 Alt+T를 사용하여 텍스트 포트를 엽니다.
터디의 파이썬 버전 3.9.5
콘다 환경 만들기 conda create -n TD python=3.9.5
환경 실행 conda activate TD
추가 패키지 설치
1. skikit-learn 설치
conda install scikit-learn
2. Darien Brito가 Kinect Azure Point Cloud 합병을 통해 소개한 open3d
conda install -c open3d-admin open3d
환경을 TOUCHDESIGNER에 연결
Execute DAT를 생성
윈도우 cmd 에 ENV의 경로 확인 : conda env list
수행하려는 작업은 시작 시 conda 환경의 사이트 패키지가 TD 및 패키지 바이너리/libs/dll 경로에 추가되었는지 확인하는 것입니다.
나는 미니콘다 아니라 .conda 경로에있음.
import sys
import os
import platform
def onStart():
user = 'YOUR_USERNAME' # Update accordingly
condaEnv = 'YOUR_ENVIRONMENT_NAME' # 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+'/miniconda3/envs/'+condaEnv+'/DLLs')
os.add_dll_directory('C:/Users/'+user+'/miniconda3/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+'/miniconda3/envs/'+condaEnv+'/DLLs' + os.pathsep + os.environ['PATH']
os.environ['PATH'] = 'C:/Users/'+user+'/miniconda3/envs/'+condaEnv+'/Library/bin' + os.pathsep + os.environ['PATH']
sys.path = ['C:/Users/'+user+'/miniconda3/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/miniconda3/envs/'+condaEnv+'/lib' + os.pathsep + os.environ['PATH']
os.environ['PATH'] = '/Users/'+user+'/opt/miniconda3/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
TOUCHDESIGNER에서 패키지(및 환경) 사용
. TouchDesigner에서 Alt+t를 눌러 텍스트 포트를 엽니다.
여기서 import sklearn
import open3d
처음엔 안됐는데 TEXTPORT 껏다키니까 됨.
'TouchDesigner > python' 카테고리의 다른 글
모터 제어 timer serial (0) | 2022.10.10 |
---|---|
python_to_touchdesinger : json to table (1) | 2022.09.25 |
- Total
- Today
- Yesterday
- 라즈베리파이
- docker
- CNC
- emotive eeg
- oculuspro
- TouchDesigner
- ardity
- Express
- Arduino
- RNN
- MQTT
- DeepLeaning
- motor controll
- VR
- unity 360
- Python
- 유니티플러그인
- node.js
- 유니티
- sequelize
- three.js
- AI
- colab
- houdini
- 후디니
- Java
- imgtoimg
- Unity
- opencv
- Midjourney
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |