반응형

Python 4

pip 에러 해결 : Faltal error in launcher: Unable to create process using '"'

fastapi를 설치를 하려는데 에러가 났다 ㅠㅠ찾아보니 경로 때문에 발생하는 오류라는데 간단하게 해결 가능하다. pip 명령어 앞에 python -m 을 붙여준다. ex) python -m pip install XXX매번 붙여주기 귀찮으니 경로를 설정해주면 된다.환경변수 설정 > Path에서 파이썬 경로를 맞춰주면 되시겠다. ㅎㅎ Python을 업그레이드 했는데 Path를 설정을 다시 안해줬었다.C:\Users\PC-075\AppData\Local\Programs\Python\Python39=> C:\Users\PC-075\AppData\Local\Programs\Python\Python312이렇게 경로를 맞춰주면 이런 에러는 나지 않는다.

Python 2024.05.16

파이썬 파일 쓰기 오류, UnicodeEncodeError: 'cp949' codec can't encode character illegal multibyte sequence

파이썬 기본이 UTF-8이 아니라서 비-영어권 사용자들은 코딩할때 별도의 옵션들을 사용해야 한다. 파일을 열때 인코딩 타입을 지정하면 해결할 수 있다. UnicodeEncodeError: 'cp949' codec can't encode character '\u0989' in position 340: illegal multibyte sequence # cp949 오류 발생 file = open('파일명','w') # 오류 수정 file = open('파일명','w',encoding='utf-8')

Python 2024.02.07
반응형