살아가는 이야기

PyCharm: unable to load file system codec 본문

컴퓨터, 풀어그림

PyCharm: unable to load file system codec

우균 2020. 7. 10. 06:22

Python과 PyCharm 조합을 사용하다가 Python도 버전업, PyCharm도 버전업을 수행한 후에, 예전 Python 코드 실행 시 다음과 같은 오류가 발생했다.

unable to load file system codec

PyCharm에서 새로 설치된 Python 위치를 찾을 수 없을 때 이런 오류가 발생한다고 한다. 그러면 다음과 같은 과정을 거쳐 PyCharm 프로젝트의 속성을 바꾸어 주면 이 문제를 해결할 수 있다. 

1. [File -> Settings...] 메뉴 혹은 [Ctrl+Alt+S] 키를 눌러 프로젝트 속성을 열고 [Project Interpreter]를 선택한다.

Select "File -> Settings..." and click "Project" properties

2. 대화창 위 쪽의 [Project Interpreter:] 행 오른쪽 끝에 있는 [톱니바퀴 버튼]을 누르고 [Add...] 메뉴를 선택한다.

Select "Project Interpreter -> Settings -> Add..."

3. [System Interpreter] 탭을 누르고 [Interpreter:] 행의 드롭다운 메뉴에서 설치된 인터프리터를 선택한 후 [OK] 버튼을 누른다.

Select "System Interpreter" and the appropriate interpreter 

4. 다시 돌아온 프로젝트 속성 대화창에서 적합한 Python을 Project Interpreter로 선택한다.

Select a correct interpreter from the dropdown list of "Project Interpreter:"

이렇게 써 놓으니 복잡한 것 같지만, [Ctrl+Alt+S] 키를 누르기만 하면 나머지는 어떻게든 찾아갈 수 있다. 무슨 일이든 첫 단추가 중요한 법이다.

 

(Related Article: Creating a new project interpreter, https://www.jetbrains.com/help/pycharm/configuring-python-interpreter.html#add_new_project_interpreter)

Comments