python
  • pip
  • python-wheel
  • 2016-11-04 90 views 2 likes 
    2

    我下載輪最新版本失敗的建築輪的mysql

    但我不完全知道如何使這種半神祕的錯誤消息的

    Failed building wheel for mysql-python 
    
        Command "/Users/username/Desktop/Project/venv/bin/python -u -c "import setuptools, 
        tokenize;__file__='/private/var/folders/bg/_nsyc_vxasdfx___h11f3jw00000gn/T/pip-build-rBf9R1/mysql-python/setup.py'; 
    f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n'); 
        f.close();exec(compile(code, __file__, 'exec'))" 
    install --record /var/folders/bg/_nsyc_vx4g___xbsh11f3jw00000gn/T/pip-Tjwbij-record/install-record.txt --single-version-externally-managed 
    --compile --install-headers /Users/username/Desktop/project/venv/include/site/python2.7/mysql-python" failed with error code 1 in 
    /private/var/folders/bg/_nsyc_vxasdf__xbsh11f3jw00000gn/T/pip-build-rBf9R1/mysql-python/ 
    

    我試圖

    pip install --upgrade wheel 
    

    ,我得到

    Requirement already up-to-date: wheel 
    

    MySQL版本

    mysql Ver 14.14 Distrib 5.7.10, for osx10.11 (x86_64) using EditLine wrapper 
    
    +0

    我經常遇到麻煩從WHL文件升級。嘗試卸載並重新安裝? – Prune

    +0

    https://stackoverflow.com/questions/43426780/failed-building-wheel-for-mysql-python也許這會幫助你。 –

    +0

    幾件事情:(1)你是否嘗試過14.14以下的任何版本,並且它是否有效? (2)你有什麼C++編譯器? – Sagar

    回答

    0

    對我來說,那是因爲我的系統缺乏python3的開發庫。它警告安裝時沒有「Python.h」。以下命令爲我修復它。

    yum install python34-devel -y

    pip3 install mysqlclient

    相關問題