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

xeomina·2022년 9월 1일
0
  • mysqlclient 설치 오류
$ pip install mysqlclient
Collecting mysqlclient
  Using cached mysqlclient-2.0.3.tar.gz (88 kB)
    ERROR: Command errored out with exit status 1:
     command: /home/song/miniconda3/envs/westarbucks/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-oc1xpiyw/mysqlclient_5065485605a44b02905d19b84f655f73/setup.py'"'"'; __file__='"'"'/tmp/pip-install-oc1xpiyw/mysqlclient_5065485605a44b02905d19b84f655f73/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-xra4p4nm
         cwd: /tmp/pip-install-oc1xpiyw/mysqlclient_5065485605a44b02905d19b84f655f73/
    Complete output (15 lines):
    /bin/sh: 1: mysql_config: not found
    /bin/sh: 1: mariadb_config: not found
    /bin/sh: 1: mysql_config: not found
  • 해결1 : tools 업데이트
$pip install --upgrade pip
$pip install --upgrade setuptools
  • 해결2
$pip install ez_setup
$sudo yum install python3-devel mysql-devel
  • gcc 설치 후 해결
$sudo yum install -y gcc
$pip install mysqlclient

0개의 댓글