728x90
반응형
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "C:\Users\user\Desktop\labelme-5.3.1\labelme-5.3.1\setup.py", line 162, in <module>
main()
File "C:\Users\user\Desktop\labelme-5.3.1\labelme-5.3.1\setup.py", line 125, in main
long_description=get_long_description(),
File "C:\Users\user\Desktop\labelme-5.3.1\labelme-5.3.1\setup.py", line 75, in get_long_description
long_description = f.read()
UnicodeDecodeError: 'cp949' codec can't decode byte 0xf0 in position 3647: illegal multibyte sequence
[end of output]
pip 패키지 설치 중 setup.py파일에서 파일을 읽어 들일 때 인코딩 문제가 발생한 문제로, 직접 tar.gz 파일을 다운받고 난 후, 직접 에러가 생기는 python 문장을 수정해 준 후, 아래 명령어로 설치해주면 해결된다고 한다.
나 같은 경우엔 labelme를 설치하던 도중에 발생한 것으로 labelme에서 공식 제공하는 tar.gz 파일을 다운 받아, 특정 폴더에 압축 해제 후, setup.py함수 내 에러를 발생하던 open함수 인자로 아래와 같이 encoding 옵션을 추가해주었다.
# Previous code
with open("README.md") as f:
# Changed code
def get_long_description():
with open("README.md", "r", encoding="utf-8") as f:
long_description = f.read()
try:
# when this package is being released
import github2pypi
return github2pypi.replace_url(
slug="wkentaro/labelme", content=long_description, branch="main"
)
except ImportError:
# when this package is being installed
return long_description
이 후 setup.py가 있는 위치에서 아래 명령어를 실행해주면 설치가 완료된다.
pip install -e .
도움 주신 출처 : https://doitgrow.com/32
https://daewonyoon.tistory.com/296
728x90
반응형
'사소한 Tip . 오류 해결법' 카테고리의 다른 글
[맥OS to Windows] 한글(파일명) 깨짐/자소분리 (0) | 2023.09.07 |
---|---|
[labelme] json.decoder.JSONDecodeError: Unexpected UTF-8 BOM(decode using utf-8-sig) (0) | 2023.09.06 |
[vscode] permission denied, ssh 연결 중에 권한 이슈 (0) | 2023.09.01 |
[glob] glob 사용시, 경로에 대괄호(bracket)가 있는 경우 (0) | 2023.09.01 |
[bash] loop in value list (0) | 2023.09.01 |