文章詳情頁
mac 安裝 python_MySQLdb
瀏覽:59日期:2022-06-30 10:41:02
問題描述
系統:mac OS 10.12.1python 2.7.10使用pip和SourceForge下載安裝兩種方式安裝python_MySQLdb 均報錯錯誤:EnvironmentError: mysql_config not found按照 http://blog.csdn.net/janroneh... 修改并未解決問題 仍報相同的錯誤
問題解答
回答1:首先需要安裝mysql的開發庫文件,類似libmysqld-dev這樣的包
回答2:用 pymysql吧,我在mac上用pymysql,安裝很容易,也還好用
回答3:brew install mysqlpip install mysqlclientor pip install MySQL-Python(注: mysqlclient是python mysqldb的一個分支,已經支持python3, 和MySQLdb接口是相同的)
相關文章:
1. mysql優化 - mysql count(id)查詢速度如何優化?2. mysql主從 - 請教下mysql 主動-被動模式的雙主配置 和 主從配置在應用上有什么區別?3. angular.js - angularjs 用ng-reapt渲染的dom 怎么獲取上面的屬性4. 主從備份 - 跪求mysql 高可用主從方案5. css3 - [CSS] 動畫效果 3D翻轉bug6. node.js - node_moduls太多了7. angular.js - Angular路由和express路由的組合使用問題8. python如何不改動文件的情況下修改文件的 修改日期9. python - django 里自定義的 login 方法,如何使用 login_required()10. angular.js - 不適用其他構建工具,怎么搭建angular1項目
排行榜
![css3 - [CSS] 動畫效果 3D翻轉bug](http://www.aoyou183.cn/attached/image/news/202304/110831f073.png)