본문 바로가기
잡동사니

[NAS] XPEnology 전용 Telegram BOT - xpebot 설치

by Vader87 2019. 5. 11.
반응형

DSM 6.1에 xpebot 설치를 시도 하는 중 격은 문제와 해결 방법을 기록으로 남긴다. 

어찌어찌 설치는 했다만 정확한 해결 방법이었는지는 아직 의문이다.

XPEnology DSM 6.0 이상에서 다운로드 스테이션 텔레그램 알림 받기

위의 강좌대로 6.0 이상의 환경 설정을 하던 도중 몇 모듈이 정상 설치 되지 않는 이슈가 발생했다.

psycopg2

...

Error : pg_config executable not found.

pg_config is required to build psycopg2 from source. Please add the directory containing pg_config to the $PATH or specify the full excutable path with the option :

...

pg_config 라는 파일이 필요한 모양인데 무엇인지 모르니... 터미널에서 해당 파일을 검색 해보니 docker에 여러개 잡혀 있는 것은 확인이 된다...

psutil

...

ERROR: Filed building wheel for psutil

...

Command "/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-FQc3GA/psutil/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-TsJe0a/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-FQc3GA/psutil/ 

...

이건 또 무슨 소리일까...

 

답답함을 느끼며 구글링 중 다음의 글을 보게 되었다.

https://github.com/pydanny/cookiecutter-django/issues/1530

 

psycopg2 is moved to psycopg-binary · Issue #1530 · pydanny/cookiecutter-django

pip install -r local.txt Downloading psycopg2-2.7.4.tar.gz (425kB) 100% |████████████████████████████████| 430kB 1.0MB/s Complete output from command python setup.py egg_info: running egg_info crea...

github.com

 

글을 다 읽지는 않았지만 버전의 문제가 아닐까 싶어 다른 버전을 설치해 보게 되었고 성공하게 되었다.

pip install psycopg2==2.7

pip install psutil==0.1.1

설치한 버전이 최신 버전들과 무엇이 다른지 까지 확인해 보진 않았지만 일단 설치가 됬으니 넘어가기로 했다.

이제 강좌의 모든 플러그인을 설치했으니 실행 되겠지 했지만 에러가 난다.

ImportError: No module named requests

requests 라는 모듈이 없다. 설치해 준다.

pip install requests

다행히 한번에 설치가 되고 봇 실행까지 완료.

 

PS 1

DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.

파이썬 버전이 2020년에 만료되니 업그레이드 하라는 소리 같은데 ... 모듈 설치시 마다 노란 색으로 경고를 띄운다.

 

PS 2

구성된 XPEnology 환경은 다음과 같다.

모델 이름 : DS3615xs

현재 DSM 버전 : DSM 6.1.6-15266

무슨 이유인지 모르겠지만 패키지 센터에서 확인된 설치된 파이썬 버전은 Python3 - 3.5.1-0108,

터미널에서 pip --version 으로 확인한 버전은 pip 19.1.1 (python 2.7) 이다.

반응형

'잡동사니' 카테고리의 다른 글

PowerToys  (0) 2020.10.26
게임 오픈 API 자료  (0) 2019.10.07
웹크롤링 불법? 합법?  (0) 2019.10.07
Windows 환경에서 Custom Uri Scheme 활용  (4) 2019.09.07
스도쿠 DB 생성  (0) 2019.03.29

댓글