2013-05-15 64 views
0

安裝MySQL的Python我試圖安裝MySQL的Python庫與Django開發,但總是在不同的方式顯示任何錯誤:錯誤在Mac

隨着PIP:

rigo:~ rigobcastro$ sudo pip install MySQL-Python 
Downloading/unpacking MySQL-Python 
    Could not fetch URL https://pypi.python.org/simple/MySQL-Python/: There was a problem confirming the ssl certificate: <urlopen error [Errno 1] _ssl.c:503: error:0D0890A1:asn1 encoding routines:ASN1_verify:unknown message digest algorithm> 
    Will skip URL https://pypi.python.org/simple/MySQL-Python/ when looking for download links for MySQL-Python 
    Could not fetch URL https://pypi.python.org/simple/: There was a problem confirming the ssl certificate: <urlopen error [Errno 1] _ssl.c:503: error:0D0890A1:asn1 encoding routines:ASN1_verify:unknown message digest algorithm> 
    Will skip URL https://pypi.python.org/simple/ when looking for download links for MySQL-Python 
    Cannot fetch index base URL https://pypi.python.org/simple/ 
    Could not fetch URL https://pypi.python.org/simple/MySQL-Python/: There was a problem confirming the ssl certificate: <urlopen error [Errno 1] _ssl.c:503: error:0D0890A1:asn1 encoding routines:ASN1_verify:unknown message digest algorithm> 
    Will skip URL https://pypi.python.org/simple/MySQL-Python/ when looking for download links for MySQL-Python 
    Could not find any downloads that satisfy the requirement MySQL-Python 
No distributions at all found for MySQL-Python 
Storing complete log in /Users/rigobcastro/.pip/pip.log 

隨着easy_install的:

rigo:~ rigobcastro$ sudo easy_install MySQL-Python 
Searching for MySQL-Python 
Reading http://pypi.python.org/simple/MySQL-Python/ 
Reading http://sourceforge.net/projects/mysql-python 
Reading https://github.com/farcepest/MySQLdb1 
Best match: MySQL-python 1.2.4 
Downloading http://pypi.python.org/packages/source/M/MySQL-python/MySQL-python-1.2.4.zip#md5=ddf2386daf10a97af115ffad2ed4a9a0 
Processing MySQL-python-1.2.4.zip 
Running MySQL-python-1.2.4/setup.py -q bdist_egg --dist-dir /tmp/easy_install-mx6sxJ/MySQL-python-1.2.4/egg-dist-tmp-XMcHdk 
Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.28.tar.gz 
Extracting in /tmp/easy_install-mx6sxJ/MySQL-python-1.2.4/temp/tmp9GMCmz 
Now working in /tmp/easy_install-mx6sxJ/MySQL-python-1.2.4/temp/tmp9GMCmz/distribute-0.6.28 
Building a Distribute egg in /private/tmp/easy_install-mx6sxJ/MySQL-python-1.2.4 
/private/tmp/easy_install-mx6sxJ/MySQL-python-1.2.4/distribute-0.6.28-py2.6.egg 
cc1: error: unrecognized command line option "-Wno-null-conversion" 
error: Setup script exited with error: command 'llvm-gcc-4.2' failed with exit status 1 
rigo:~ rigobcastro$ 

隨着LLVM-GCC-4.2的錯誤,我嘗試安裝XCod e及其命令行工具和GCC解決方案。

我有Python 2.7.4和Mac OSX Lion 10.7.5。

+1

它應該是pip安裝mysql-python的pip。 –

+0

@Hedde這個錯誤不適用於Camelcase http://pasteboard.co/2rRlUXiL.png無論如何 – rigobcastro

回答

0

正如其他人在我之前提到的......在Mac上使用MySQL與MySQL一起工作是一個@ @ $ @ @ &%^!惡夢。

在Mac OS 10.7.5

安裝Django框架最初從原來的Django的網站,當MySQLdb的沒有工作,和許多小時google搜索,並從SO試圖解決方案後,我已經安裝Django的從BitNami http://bitnami.com/stack/django

儘管如此,得到了和上面提到的問題則更多一些......

什麼幫助我最終是什麼喬希在他的博客中建議: http://joshbranchaud.com/blog/2013/02/10/Errors-While-Setting-Up-Django.html

現在的Python 2.7最終連接到MySQL 5.5