선발대

[에러] 파이참 poetry 설치 시 인코딩 에러 본문

참고사항/에러노트

[에러] 파이참 poetry 설치 시 인코딩 에러

신선한 스타트 2022. 3. 11. 19:55
에러상태

 

Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'

 

EnvCommandError

  Command C:\Users\Username\AppData\Local\pypoetry\Cache\virtualenvs\pythonproject3-vNE5Sc6M-py3.9\Scripts\python.exe -W ignore - errored with the fo
llowing return code 1, and output:
  Python path configuration:
    PYTHONHOME = (not set)
    PYTHONPATH = (not set)
    program name = 'C:\Users\\ub0a8\ud6a8\uc815\AppData\Local\pypoetry\Cache\virtualenvs\pythonproject3-vNE5Sc6M-py3.9\Scripts\python.exe'
    isolated = 0
    environment = 1
    user site = 1
    import site = 1
    sys._base_executable = 'C:\\Users\\\ub0a8\ud6a8\uc815\\AppData\\Local\\pypoetry\\Cache\\virtualenvs\\pythonproject3-vNE5Sc6M-py3.9\\Scripts\\py
thon.exe'
    sys.base_prefix = ''
    sys.base_exec_prefix = ''
    sys.platlibdir = 'lib'
    sys.executable = 'C:\\Users\\\ub0a8\ud6a8\uc815\\AppData\\Local\\pypoetry\\Cache\\virtualenvs\\pythonproject3-vNE5Sc6M-py3.9\\Scripts\\python.e
xe'
    sys.prefix = ''
    sys.exec_prefix = ''
    sys.path = [
      'C:\\Users\\\ub0a8\ud6a8\uc815\\AppData\\Local\\pypoetry\\Cache\\virtualenvs\\pythonproject3-vNE5Sc6M-py3.9\\Scripts\\python39.zip',
      '.\\DLLs',
      '.\\lib',
      'C:\\Users\\\ub0a8\ud6a8\uc815\\AppData\\Local\\pypoetry\\Cache\\virtualenvs\\pythonproject3-vNE5Sc6M-py3.9\\Scripts',
    ]
  Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
  Python runtime state: core initialized
  ModuleNotFoundError: No module named 'encodings'

  Current thread 0x00003088 (most recent call first):
  <no Python frame>
  input was : import sys

  if hasattr(sys, "real_prefix"):
      print(sys.real_prefix)
  elif hasattr(sys, "base_prefix"):
      print(sys.base_prefix)
  else:
      print(sys.prefix)


  at ~\.poetry\lib\poetry\utils\env.py:1195 in _run
      1191│                 output = subprocess.check_output(
      1192│                     cmd, stderr=subprocess.STDOUT, **kwargs
      1193│                 )
      1194│         except CalledProcessError as e:
    → 1195│             raise EnvCommandError(e, input=input_)
      1196│
      1197│         return decode(output)
      1198│
      1199│     def execute(self, bin, *args, **kwargs):​

 

에러화면

 

팀원 분이 주신 git을 clone 해서 인터프리터를 설정했더니 이런 식으로 나왔다. 처음에는 잘 되었기 때문에, 다른 공부하다가 다시 초기화하고 했더니 이 모양.. cp949 문제라서 encoding 문제인가 했더니 엄청난 삽질이었다. 

 

 

해결방법

 

pip install poetry
poetry --version
poetry show
poetry install

 

진작에 질문드릴 걸 그랬다! 인터프리터 설정으로는 poetry가 잘 실행이 안돼서 명령어로 하면 잘 된다고 하셨다.

해결 완료~ 

Comments