pyenv install build failed error Mac OS

Mac에 pyenv는 정상적으로 설치했다. pyenv 설치 후 특정 version의 python을 설치하려고 다음과 같은 명령 수행 시 BUILD FAILED 에러 발생했다. $pyenv install 3.5.3 python-build: use openssl@1.1 from homebrew python-build: use…

0 Comments

Flair를 이용한 Text Classification

본 글은 다음 글을 참고하여 작성했습니다. https://towardsdatascience.com/text-classification-with-state-of-the-art-nlp-library-flair-b541d7add21f Flair 설치 Flair는 python 3.6 이상에서만 동작한다. $ pip install flair 트레이닝 된 모델 테스트 해보기 Flair에서 제공하는 트레이닝 된 모델은 텍스트에서 긍/부정…

0 Comments

python opencv videocapture example

import numpy as np import cv2 cap = cv2.VideoCapture(0) while(True): # Capture frame-by-frame ret, frame = cap.read() # Our operations on the frame come here gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY) #…

0 Comments

Dialogflow event trigger

Dialogflow를 사용하다가 특정 문장 입력 없이 reponse를 받는 방법이 없을까 고민하던 중 event trigger 기능이 있는 것을 알았다. Intent를 정의할 때 Event name을 지정할 수 있는데 이를 사용해서 response를 받는…

0 Comments

snowboy를 이용한 hot word detection

의존 패키지 설치 $ sudo apt-get install swig $ sudo apt-get install python-pyaudio python3-pyaudio sox $ sudo apt-get install libatlas-base-dev $ sudo apt-get install portaudio19-dev $ sudo apt-get install python-dev…

0 Comments

Python으로 Telegram 응답 봇 만들기

다음은 Telegram과 연동하여 메시지, 이미지를 받고 response할 수 있는 예제 코드다. from telegram.ext import Updater, MessageHandler, Filters, CommandHandler # import modules import os my_token = '' print('start telegram chat bot')…

0 Comments

python Pillow 설치 시 에러

running build_ext The headers or library files could not be found for jpeg, a required dependency when compiling Pillow from source. Please see the install instructions at: https://pillow.readthedocs.io/en/latest/installation.html Traceback (most…

0 Comments

python 3.6에서 numpy 설치할 때 에러

don't know how to compile Fortran code on platform 'posix' C compiler: aarch64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC compile options: '-Inumpy/core/src/common -Inumpy/core/src…

0 Comments