2017-06-12 9 views
0

MacOS Sierra(Python3)用にmysqlclientをインストールしようとしています。MacOS Sierra(Python 3.6)にmysqlclientをインストール中にエラーが発生しました

まあ、私は公式ページ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の両方を使用している疑いがあります。しかし、実際には、私は知りません:)

EDIT:検索の使用済みの時間を、まだこれは私を助け答え

答えて

0

あなたのピップは古いです。まずそれをアップグレードしてから、試してください。

pip3 install -U pip 
sudo pip3 install mysqlclient 
関連する問題