重拾python mac1.9.2

python Django

1.xcode

2.python

3.pip

  1)download get-pip.py

  2)python get-pip.py

4.Django pip install Django==1.6.2(可自己下载安装)

5.mysql  https://www.akii.org/mac-os-x-install-mysql-dm.html

6.mysqldb(pip install mysql-python 失败自行下载安装包

  1)修改(路径根据本机自己设定)

     site.cfg        mysql_config = /usr/local/mysql/bin/mysql_config

   setup_posix.py   mysql_config.path = "/usr/local/mysql/bin/mysql_config"

 

  2)sudo python setup.py build  

   sudo python setup.py install  

  3) 1.python

    2.import MySQLdb,此时出现一个错误,错误最后一行写着 Reason: image not found。     

            执行$ sudo ln -s /usr/local/mysql/lib/libmysqlclient.18.dylib /usr/lib/libmysqlclient.18.dylib

              $ sudo ln -s /usr/local/mysql/lib /usr/local/mysql/lib/mysql

 

参考:http://www.lihui.info/mac-pydev-mysqldb/

     http://www.cnblogs.com/ifantastic/archive/2013/04/13/3017677.html等网友方案

重拾python mac1.9.2,布布扣,bubuko.com

重拾python mac1.9.2

上一篇:javascript设计模式--备忘录模式(Memento)


下一篇:JavaScript之setcookie()讲解