[英]Error HTTP Error 403: SSL is required when pip installing MySQL-python
I'm having a problem pip installing MySQL Python on my server. 我在服务器上安装MySQL Python时遇到问题。
Full stack trace is as follows: 完整的堆栈跟踪如下:
(ENV)[fendyhj@web530 lepaperville]$ pip install MySQL-python
Downloading/unpacking MySQL-python
Running setup.py egg_info for package MySQL-python
Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.28.tar.gz
Traceback (most recent call last):
File "<string>", line 16, in <module>
File "/home/fendyhj/webapps/lepaperville/ENV/build/MySQL-python/setup.py", line 7, in <module>
use_setuptools()
File "distribute_setup.py", line 145, in use_setuptools
return _do_download(version, download_base, to_dir, download_delay)
File "distribute_setup.py", line 124, in _do_download
to_dir, download_delay)
File "distribute_setup.py", line 194, in download_setuptools
src = urlopen(url)
File "/usr/local/lib/python2.7/urllib2.py", line 154, in urlopen
return opener.open(url, data, timeout)
File "/usr/local/lib/python2.7/urllib2.py", line 437, in open
response = meth(req, response)
File "/usr/local/lib/python2.7/urllib2.py", line 550, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/local/lib/python2.7/urllib2.py", line 475, in error
return self._call_chain(*args)
File "/usr/local/lib/python2.7/urllib2.py", line 409, in _call_chain
result = func(*args)
File "/usr/local/lib/python2.7/urllib2.py", line 558, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 403: SSL is required
Complete output from command python setup.py egg_info:
Downloading
http://pypi.python.org/packages/source/d/distribute/distribute-0.6.28.tar.gz
urllib2.HTTPError: HTTP Error 403: SSL is required
Anyone know how to install MySQL Python through HTTPS ? 有人知道如何通过HTTPS安装MySQL Python吗? Any help would be appreciated, Thanks !
任何帮助,将不胜感激,谢谢!
Looks like python is missing the ssl bindings, I would make sure ssl is installed and reinstall python. 看起来python缺少ssl绑定,我将确保已安装ssl并重新安装python。 If it does not work you can compile python yourself https://askubuntu.com/questions/21547/what-are-the-packages-libraries-i-should-install-before-compiling-python-from-so
如果不起作用,您可以自己编译python https://askubuntu.com/questions/21547/what-are-the-packages-libraries-i-should-install-before-compiling-python-from-so
您可以从https://dev.mysql.com/downloads/connector/python/获取tar
包,并手动安装
最后的解决方案是改为安装mysqlclient,因为自2014年以来就没有更新MySQL Python,请致谢@alasdair
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.