mac下安裝Mysql和MySQL-python_MySQL
來源:懂視網(wǎng)
責(zé)編:小采
時(shí)間:2020-11-09 19:17:42
mac下安裝Mysql和MySQL-python_MySQL
mac下安裝Mysql和MySQL-python_MySQL:python mac下安裝Mysql和MySQL-python安裝mysqlmac mysql下載地址裝好后mysql路徑是在 /usr/local/mysql 下初始化mysql密碼/usr/local/mysql/bin/mysqladmin -u root password 12345678安裝MySQL-python下載My
導(dǎo)讀mac下安裝Mysql和MySQL-python_MySQL:python mac下安裝Mysql和MySQL-python安裝mysqlmac mysql下載地址裝好后mysql路徑是在 /usr/local/mysql 下初始化mysql密碼/usr/local/mysql/bin/mysqladmin -u root password 12345678安裝MySQL-python下載My
python
mac下安裝Mysql和MySQL-python
安裝mysql
- mac mysql下載地址
- 裝好后mysql路徑是在 /usr/local/mysql 下
- 初始化mysql密碼
/usr/local/mysql/bin/mysqladmin -u root password 12345678
安裝MySQL-python
下載MySQL-python
安裝MySQL-python
- 如果沒有裝gcc,去裝xcode吧,網(wǎng)上也有教程不裝xcode直接裝gcc
- cd MySQL-python-1.2.3
- vim site.cfg
mysql_config = /usr/local/bin/mysql_config
- python setup.py build
clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]clang: note: this will be a hard error (cannot be downgraded to a warning) in the futureerror: command 'cc' failed with exit status 1默認(rèn)用cc編譯器,導(dǎo)致掛了,所以換成gcc來編譯
- CC=gcc ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future python setup.py build
- sudo python setup.py install
- vim ~/.bashrc
export DYLD_LIBRARY_PATH="/usr/local/mysql/lib"export VERSIONER_PYTHON_PREFER_64_BIT=noexport VERSIONER_PYTHON_PREFER_32_BIT=yes
就可以用了 import MySQLdb
聲明:本網(wǎng)頁內(nèi)容旨在傳播知識(shí),若有侵權(quán)等問題請(qǐng)及時(shí)與本網(wǎng)聯(lián)系,我們將在第一時(shí)間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com
mac下安裝Mysql和MySQL-python_MySQL
mac下安裝Mysql和MySQL-python_MySQL:python mac下安裝Mysql和MySQL-python安裝mysqlmac mysql下載地址裝好后mysql路徑是在 /usr/local/mysql 下初始化mysql密碼/usr/local/mysql/bin/mysqladmin -u root password 12345678安裝MySQL-python下載My