본문 바로가기
프로그래밍 팁/Python

파이썬(PIP) numpy, pandas, matplotlib 설치 실패(에러) 해결 방법

by Archivers 2022. 4. 16.

 

 

pip로 numpy나 pandas 설치 시도 시 다음과 같은 문구를 포함한 장문의 에러 메시지를 출력하며 설치에 실패하는 경우가 있습니다.

  • ERROR: Command errored out with exit status 1
  • ERROR: Failed building wheel for numpy
  • ERROR: Could not build wheels for numpy which use PEP 517 and cannot be installed directly
  • failed with exit status 1
  • Failed to build numpy

혹은 matplotlib 설치 시도 시에도 비슷하게 장문의 에러 메시지와 함께 다음의 문구를 출력하는 경우가 있습니다.

  • ERROR: Command errored out with exit status 1
  • ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

이러한 에러는 M1 맥이나 윈도우 등, 특정 환경에 국한되어 나타나는 에러가 아니고 pip 버전이 낮을 때 발생할 수 있는 에러입니다. 따라서 pip를 업그레이드하면 해결됩니다. pip를 업그레이드하는 명령어는 다음과 같습니다.

pip install --upgrade pip

이 명령어를 통해 pip를 업그레이드한 후에, 에러가 났던 패키지에 대해서 다시 설치를 시도해보면 정상적으로 설치되는 것을 확인할 수 있습니다. 참고로 이 명령어는 가상 환경(Virtual Environments, venv)에서 사용하면 해당 가상 환경의 pip에만 업그레이드가 적용됩니다.

댓글