본문 바로가기
CS/Python

[Python 오류] pip install 안 될 때

by Code Song 2022. 12. 16.

혹시 질문이 있으시면 언제든지 댓글 남겨주세요

최선을 다해서 도와보겠습니다..

 

 

1. 비주얼 스튜디오에서 "pip install package" 실행 시 invalid syntax

cmd에서 pip install 불가능.

python.exe에서도 pip install 불가능

 

Solution > cmd에서 python -m pip install package

 

 

 

 

2.  python setup.py egg_info did not run successfully

 

× python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [3 lines of output]
      pystache: using: version '58.1.0' of <module 'setuptools' from 'C:\\Users\\song\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\setuptools\\__init__.py'>
      Warning: 'classifiers' should be a list, got type 'tuple'
      error in pystache setup command: use_2to3 is invalid.
      [end of output]

 

Solution1 > cmd에서 sudo -H pip3 install --upgrade --ignore-installed pip setuptools

그런데 이 경우에 문제 3 이나 4가 발생할 수 있다. 그렇다면 Solution2를 해보자.

 

Solution2 >

pip install "setuptools<58.0.0"

 

 

 

 

3. sudo는 내부 또는 외부 명령, 실행할 수 있는 프로그램, 또는 배치 파일이 아닙니다.

장난?

 

Solution > cmd에서 python -m pip install sudo

 

 

 

 

4. python: can't open file : [Errno 2] No such file or directory

나의 경우에는 python: can't open file '파일경로\\sudo': [Errno 2] No such file or directory 였다.

Solution > 환경변수 추가 

 

댓글