오류확인.해결
anaconda prompt 에러(error) : UnicodeEncodeError: 'charmap' codec can't encode character '\ucc1c' in position 9: character maps to <undefined>
emilyyoo
2024. 7. 22. 15:50
728x90
- 에러 메시지:
- UnicodeEncodeError: 'charmap' codec can't encode character '\ucc1c' in position 9: character maps to <undefined>
- 원인 : 이 문제는 환경 변수나 경로에 있는 유니코드 문자를 인코딩할 수 없어서 발생하는 문제
- 해결1 : 경로나 환경 변수를 영어로 변경, 나의 경우 window 로그인한 user가 한글이어서 발생.
- 해결2 : 그 한글 경로에서 계속 작업하고 싶을 때. 아래와 같이 unicode encoding 옵션 주기.
- chcp 65001
- set PYTHONIOENCODING=utf-8
***그리고 난 후 가상환경 생성할 때도 --solver=classic 붙여서 아래와 같이 해주었다.
conda create --name newenv python=3.9 --solver=classic
728x90