請問python3.4 32bit 的mysql板本何處下載??

67 views
Skip to first unread message

gx83...@gmail.com

unread,
May 9, 2016, 8:08:03 AM5/9/16
to python.tw
>>> import mysqldb
Traceback (most recent call last):
  File "<pyshell#0>", line 1, in <module>
    import mysqldb
ImportError: No module named 'mysqldb'
>>> 我有安裝mysql-connector-python-2.1.3-py3.4-win32但是仍然
出現下述錯誤,是否有安裝錯誤或板本不對
mysql:mysql-installer-community-5.7.10.0

He-chien Tsai

unread,
May 9, 2016, 11:09:24 PM5/9/16
to python.tw
用 virtualenv 建立沙盒環境才不會有這種版本依賴不相容的問題

gx83...@gmail.com於 2016年5月9日星期一 UTC+8下午8時08分03秒寫道:

Sonic Yang

unread,
May 10, 2016, 3:13:04 AM5/10/16
to pyth...@googlegroups.com
hi,

try this 
>>> import MySQLdb
if still cannot work please install the module with pip
$sudo pip install MySQL-python

i am too lazy to use virtualenv.....may some bads will come for me soonnnn.....

Best regards,
Sonic

--
這是 Google 網上論壇針對「python.tw」群組發送的訂閱通知郵件。
如要取消訂閱這個群組並停止接收來自這個群組的郵件,請傳送電子郵件到 pythontw+u...@googlegroups.com
如要在這個群組張貼留言,請傳送電子郵件到 pyth...@googlegroups.com
請前往以下網址造訪這個群組:https://groups.google.com/group/pythontw
如需更多選項,請前往:https://groups.google.com/d/optout

Sonic Yang

unread,
May 10, 2016, 3:24:33 AM5/10/16
to pyth...@googlegroups.com
and if you use connector you should import mysql.connector
the detail as the link below,

Best regards,
Sonic

He-chien Tsai

unread,
May 11, 2016, 12:47:25 AM5/11/16
to python.tw
題主的系統顯然不是Linux, 沒有sudo跟全域安裝的概念, 只能找到批配版本的安裝檔或者用virtualenv

python group於 2016年5月10日星期二 UTC+8下午3時13分04秒寫道:

Sonic Yang

unread,
May 11, 2016, 4:28:05 AM5/11/16
to pyth...@googlegroups.com
我之後也有在WINDOWS下用包好的MSI, https://pypi.python.org/pypi/MySQL-python/1.2.5
在python v2.7 32bit可以import
如果要在windows下用pip裝要有Visual Studio 2008 C compiler...
python v3.4 似乎尚未支援

Best regards
Sonic
Reply all
Reply to author
Forward
0 new messages