Ubuntsu pip install error: command ‘x86_64-linux-gnu-gcc’ failed with exit status 1エラー解決

ERROR

環境

  • Ubuntu:20.04
  • Python 3.8

コマンド

pip install flask awscli boto3 numpy flask-cors flask-httpauth requests pytz slackclient crochet

エラー内容

...
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.8 -c src/twisted/test/raiser.c -o build/temp.linux-x86_64-3.8/src/twisted/test/raiser.o
    unable to execute 'x86_64-linux-gnu-gcc': No such file or directory
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-9ynifkpc/twisted/setup.py'"'"'; __file__='"'"'/tmp/pip-install-9ynifkpc/twisted/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-nwe2umtl/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.8/Twisted Check the logs for full command output.

解決方法

ビルドできるようにライブラリをインストール

apt-get install build-essential libssl-dev libffi-dev python3-dev
0 0
Article Rating
申し込む
注目する
guest

0 Comments
インラインフィードバック
すべてのコメントを見る
0
あなたの考えが大好きです、コメントしてください。x