LoginSignup
2
1

More than 5 years have passed since last update.

macOS High Sierra + Python 3.6でmysqlclientをインストールする

Posted at

概要

mysqlclient-pythonを公式のREADME.mdどおりにpipでインストールしようとすると、IndexError: string index out of rangeとエラーが出るので、下記の要領でインストールしたら成功した。

コマンド

$ brew install mysql  # <- mysql-connector-cの代わり
$ pip3 install mysqlclient

雑記

  • mysql-connector-cを使うMySQL系Pythonパッケージは軒並みインストールに失敗するぽいですね。
  • 本当はREADME.mdを変更してPull Request出したほうが良かったのかもしれないのですが、原因を探っていろんな環境でテストして、しっかりしたIssueを書く時間がなかったです、すみません…

環境

  • macOS High Sierra 10.13.1
  • Homebrew 1.3.6
  • Python 3.6.3
  • pip 9.0.1
  • MySQL 5.7.20

参考

2
1
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
2
1