我想爲我的MacOS Sierra(Python3)安裝mysqlclient。在MacOS Sierra上安裝mysqlclient時出錯(Python 3.6)
那麼,我試圖按照官方頁面https://github.com/PyMySQL/mysqlclient-python指示。
所以,一切都很好,直到:
pip install mysqlclient
pip3 install mysqlclient
它拋出我接下來的事情就:
Collecting mysqlclient
Using cached mysqlclient-1.3.10.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/q4/j199zrpj015c7dyj7qfl22qm0000gn/T/pip-build-9v6DOo/mysqlclient/setup.py", line 17, in <module>
metadata, options = get_config()
File "setup_posix.py", line 54, in get_config libraries = [dequote(i[2:]) for i in libs if i.startswith('-l')]
File "setup_posix.py", line 12, in dequote if s[0] in "\"'" and s[0] == s[-1]:
IndexError: string index out of range
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/q4/j199zrpj015c7dyj7qfl22qm0000gn/T/pip-build-9v6DOo/mysqlclient/
如果任何人有一些想法解決它,請幫助我。 (圖書館是用brew下載的)。 我懷疑我的Mac上有Python 2.7和Python 3.6。但是,其實我不知道:)
編輯:搜索花了幾個小時,還是沒能找到答案
謝謝....這對我有用.. –