Python2 安裝MySQLdb庫

今天爬了半天坑,終於在windows上安裝好了python2的MySQLdb庫,直接使用cmd命令安裝就會遇到各種報錯

python.exe -m pip install mysqlclient==1.3.12


然後去https://www.lfd.uci.edu/~gohlke/pythonlibs/#mysql-python這個網站上下源文件,先去檢查一下自己是什麼系統,然後下載對於的32位或者64位文件

根據文件位置運行一下安裝命令,然後就安裝好了

E:\seven>test\Scripts\python.exe -m pip install test\MySQL_python-1.2.5-cp27-none-win_amd64.whl
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Processing e:\seven\test\mysql_python-1.2.5-cp27-none-win_amd64.whl
Installing collected packages: MySQL-python
Successfully installed MySQL-python-1.2.5

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章