without haste but without rest

ubuntu 20.04 - konlpy 설치 이슈 및 트러블슈팅 본문

etc.

ubuntu 20.04 - konlpy 설치 이슈 및 트러블슈팅

JinungKim 2021. 9. 30. 20:29

환경

OS: Ubuntu 20.04

Python: 3.8

Konlpy: 0.5.2


총 4 단계를 거쳐야 한다. 

모두 버전 업데이트에 따른 변수 이름 변경이 주요 원인이다.

 

에러 목록

1. konlpy AttributeError: module 'tweepy' has no attribute 'StreamListener'

2. def _start(self, async): ^ SyntaxError: invalid syntax

3. Konlpy TypeError: startJVM() got an unexpected keyword argument 'convertStrings'
4. AttributeError: module 'six' has no attribute 'ensure_str'


 

1. konlpy AttributeError: module 'tweepy' has no attribute 'StreamListener'

tweepy 모듈의 버전이 문제다.

현재 버전 제거하고 3.1.0 버전으로 설치한다.

# 현재 버전 제거
pip3 uninstall tweepy

# 3.1.0 버전 재설치
pip3 install tweepy===3.1.0

 

 

Tweepy 3.10.0, AttributeError: module 'tweepy' has no attribute 'Client'

I am trying to use version 2 of the Twitter API with tweepy 3.10.0, and I got confused when following the documentation, https://docs.tweepy.org/en/latest/client.html When I tried to set the API, l...

stackoverflow.com

 

 

2. def _start(self, async): ^ SyntaxError: invalid syntax

파이썬 코루틴 업데이트에 따라 기존에 사용하던 async 라는 변수명을 async_ 로 변경하게 되었다.

현재 프로젝트에서 사용하고 있는 파이썬의 패키지 디렉토리인

lib/pythonN.N/site-pakages/ 경로로 이동하고

tweepy/StreamListener.py 파일 내부의 

async 변수를 모두 async_로 변경한다.

 

async invalid syntax · Issue #1017 · tweepy/tweepy

I'm fairly new to coding---just taking a coding class this semester. I'm using a MacBook Air and downloaded PyCharm, and so far, I've been able to figure most things out, but I'm st...

github.com

 

3. Konlpy TypeError: startJVM() got an unexpected keyword argument 'convertStrings'

자세히 찾아보지는 않았지만 위와 같이 버전 업데이트에 따른 변수명 변경 혹은 삭제인듯 하다.

현재 프로젝트에서 사용 중인 파이썬의 lib/pythonN.N/site-pakages/ 경로로 이동하고

konlpy/jvm.py 의 68번째 라인의

convertStrings=True를 주석처리 해준다.

 

자세한 내용은 아래 포스팅 참조

 

Konlpy TypeError: startJVM() got an unexpected keyword argument 'convertStrings'

* MAC 기준 Konlpy를 쓰려고 하는데 TypeError: startJVM() got an unexpected keyword argument 'convertStrings' 에러가 뜬다. https://nogadaworks.tistory.com/193 블로그에서 일련의 과정을 따라서 내려오면..

zereight.tistory.com

 

 

4. AttributeError: module 'six' has no attribute 'ensure_str'

해당 모듈도 버전 이슈 문제다.

현재 버전 제거하고 1.12.0 버전으로 재설치한다.

# 현재 버전 제거
pip3 uinstall six

# 1.12.0 버전 설치
pip3 install six==1.12.0
 

AttributeError: 'module' object has no attribute 'ensure_str'

I try to transfer data from one bigquery to anther through Beam, however, the following error comes up: WARNING:root:Retry with exponential backoff: waiting for 4.12307941111 seconds before retrying

stackoverflow.com


'etc.' 카테고리의 다른 글

DDD  (0) 2022.05.06
Codility Lesson4 MaxCounter 파이썬 풀이  (1) 2021.10.08
konlpy m1 칩 이슈  (0) 2021.09.23
크론탭 튜토리얼  (0) 2021.05.17
자바스크립트 UTC to KST 변환  (0) 2021.05.07
Comments