Installing MySQL Python on Mac OS X

后端 未结 15 2100
隐瞒了意图╮
隐瞒了意图╮ 2020-11-27 03:02

Long story short, when I write the following:

sudo easy_install MySQL-python

I get the error

EnvironmentError: mysql

15条回答
  •  醉梦人生
    2020-11-27 03:48

    I am using Python 2.7.11 :: Anaconda 2.3.0 (x86_64) on Mac OS X 10.11.4 15E65.

    You may want to follow the steps below:

    • Install homebrew
    • Open a terminal and run: brew install mysql-connector-c
    • pip install mysql-python

    Then the Anaconda will have the mysql-python installed and you can start with MySQLdb then.

    Good luck. Thanks.

提交回复
热议问题