首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在Mac上安装MySQL-Python时出错

在Mac上安装MySQL-Python时出错
EN

Stack Overflow用户
提问于 2013-05-15 13:27:21
回答 2查看 1.7K关注 0票数 0

我试图安装MySQL库,以便使用Django进行开发,但总是以不同的方式显示任何错误:

与PIP:

代码语言:javascript
复制
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:

代码语言:javascript
复制
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错误,我尝试安装XCode及其命令行工具和GCC解决方案。

我有Python2.7.4和MacOSXLion10.7.5。

EN

回答 2

Stack Overflow用户

发布于 2013-05-24 15:22:06

这似乎是一个与SSL相关的问题。在这里你可以找到解释。https://github.com/pypa/pip/issues/829

票数 0
EN

Stack Overflow用户

发布于 2013-10-08 01:07:53

正如前面提到的me....getting,Python在Mac上使用MySQL是一个?@#$@&%^!!恶梦。

在MacOS10.7.5上安装了Django框架,最初是从原来的Django网站上安装的,当MySQLdb无法工作时,在googling上搜索并尝试解决方案之后,我已经从BitNami http://bitnami.com/stack/django安装了Django堆栈

不过,有上面提到的问题然后还有更多..。

最终帮助我的是乔希在他的博客上推荐的:http://joshbranchaud.com/blog/2013/02/10/Errors-While-Setting-Up-Django.html

现在Python2.7终于连接到MySQL 5.5

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/16566331

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档