2017-05-20 160 views
0

因此,我正在嘗試使用Connector/Python按照教程連接到SQL數據庫。無法使用PIP安裝庫

我必須將其導入,很明顯:

進口mysql.connector

所以我在終端試圖pip install mysql

這是我得到:

命令 「蟒蛇setup.py egg_info」 在/私營/無功/文件夾/ G6/yrxcmygn3ls375rm9rh3p86r0000gn/T/PIP-集結a0d0rzdl/MySQL-錯誤代碼1失敗蟒蛇/

我已經從谷歌上查找嘗試:

pip install --upgrade setuptools 

pip install ez_setup 

pip install unroll 

easy_install -U setuptools 

毫無效果

感謝

+0

請參閱http://stackoverflow.com/questions/40512331/how-to-install-mysql-python-by-pip然後可能會看到http://stackoverflow.com/questions/26560973/python3-mysql-error- loading-mysqldb-module-no-module-named-mysqldb/40557340 –

+0

你使用哪個操作系統? Linux,Windows,...?哪個版本? –

回答