`
xiaobin268
  • 浏览: 12156 次
  • 性别: Icon_minigender_1
  • 来自: 青岛
文章分类
社区版块
存档分类
最新评论

python安装simplejson

阅读更多
今天做python的应用的时候,用到了json。google下,发现simplejson用的比较多。好吧,安装,到http://undefined.org/python/#simplejson下载,在安装的时候,出现了问题,花费了我3个小时。很郁闷。才开始,以为我安装的问题。最后发现下载的时候出现404错误,错误代码:
Downloading http://pypi.python.org/packages/2.6/s/setuptools/setuptools-0.6c7-py
2.6.egg
Traceback (most recent call last):
  File "setup.py", line 10, in <module>
    use_setuptools(min_version=min_version)
  File "E:\Django\simplejson\ez_setup.py", line 86, in use_setuptools
    egg = download_setuptools(version, download_base, to_dir, download_delay)
  File "E:\Django\simplejson\ez_setup.py", line 142, in download_setuptools
    src = urllib2.urlopen(url)
  File "E:\Python\lib\urllib2.py", line 124, in urlopen
    return _opener.open(url, data, timeout)
  File "E:\Python\lib\urllib2.py", line 389, in open
    response = meth(req, response)
  File "E:\Python\lib\urllib2.py", line 502, in http_response
    'http', request, response, code, msg, hdrs)
  File "E:\Python\lib\urllib2.py", line 427, in error
    return self._call_chain(*args)
  File "E:\Python\lib\urllib2.py", line 361, in _call_chain
    result = func(*args)
  File "E:\Python\lib\urllib2.py", line 510, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 404: Not Found

我把上面的下载链接输入到浏览器。浏览也是404错误。发现错误出错在于ez_setup.py,找到代码第二行把
import sys
DEFAULT_VERSION = "0.6c6",
该成
import sys
DEFAULT_VERSION = "0.6c9"

然后安装OK,可以了。
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics