Help us understand the problem. What are the problem?

More than 5 years have passed since last update.

posted at



$ pip search mysql
mysql-connector-python (2.0.4)         - MySQL driver written in Python
  # 検索して出てくるからインストールできると思った

$ pip install mysql-connector-python==2.0.4
Collecting mysql-connector-python==2.0.4
  Could not find a version that satisfies the requirement mysql-connector-python==2.0.4 (from versions: )
No matching distribution found for mysql-connector-python==2.0.4
  # 検索結果にいたのにMac用に用意されていなかったためかエラーに。
  # バージョン未指定でも同様
  # 導入中のPythonのバージョンに依存したものかもしれない。(自分はpython2.7.10で確認)

(参考:StackOverFlow - How do you install mysql-connector-python

$  git clone https://github.com/mysql/mysql-connector-python.git
$  cd mysql-connector-python
$  python ./setup.py build
$  sudo python ./setup.py install

$ python
>>> import mysql.connector as msc
>>> msc.__version__
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Sign upLogin
Help us understand the problem. What are the problem?