linter pylint 설치 오류

럼포 ㅣ 2020. 11. 16. 18:08

vscode 에서 linter pylint를 설치하려는데 오류가 났다.

정확히는 vscode에서 linter pylint가 설치되어 있지 않다고 설치하라는 창을 띄워줘서 install 버튼을 눌렀을 때

$ C:/Users/asd/.virtualenvs/encrypt-H_YIO3JL/Scripts/python.exe c:\Users\asd.vscode\extensions\ms-python.python-2020.11.358366026\pythonFiles\pyvsc-run-isolated.py pip install -U pylint
C:\Users\asd.virtualenvs\encrypt-H_YIO3JL\Scripts\python.exe: can't open file 'c:Usersasd.vscodeextensionsms-python.python-2020.11.358366026pythonFilespyvsc-run-isolated.py': [Errno 2] No such file or directory

라는 오류가 뜨는 것이다.

오류문을 자세히 보면 경로 사이사이에 /가 생략된 것을 볼 수 있는데 아마 터미널에서 escape처리가 된 것 같다. 따라서 제대로 된 경로가 입력되지 않는 것이다.

오류 해결을 위해서는 터미널에 명령어를 입력할 때 경로에 있는 \를 \\로 바꾸어주면 된다. 즉,

$ C:/Users/asd/.virtualenvs/encrypt-H_YIO3JL/Scripts/python.exe c:\\Users\\asd\\.vscode\\extensions\\ms-python.python-2020.11.358366026\\pythonFiles\\pyvsc-run-isolated.py pip install -U pylint

이렇게 말이다.
이후 오류가 발생하지 않고 정상 설치가 되었다.

'Visual Studio Code' 카테고리의 다른 글

Pylance Auto import가 적용되지 않을 때  (0) 2023.02.06
black formatter 사용  (0) 2021.03.02