0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

mysqlclientをpipでインストールする際に出るerror: command 'gcc' failed with exit status 1の対処法

Last updated at Posted at 2019-09-09

開発環境

OS: macOS Mojave 10.14.5
言語: python 3.7.2

エラーの内容

ターミナルでmysqlclientをインストールするために以下のコードを実行しようとした。

$ pip install mysqlclient

エラーが出た。

error: command 'gcc' failed with exit status 1

対処法

$ sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /

再度インストール。

$ pip install mysqlclient
  Using cached https://files.pythonhosted.org/packages/4d/38/c5f8bac9c50f3042c8f05615f84206f77f03db79781db841898fde1bb284/mysqlclient-1.4.4.tar.gz
Installing collected packages: mysqlclient
  Running setup.py install for mysqlclient ... done
Successfully installed mysqlclient-1.4.4

解決!

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?