关于protobuf的问题

Problem & Solution

Problem_0

$ conda update conda
Traceback (most recent call last):
  File "/home/hok/anaconda2/bin/conda", line 6, in <module>
    sys.exit(conda.cli.main())
  File "/home/hok/anaconda2/lib/python2.7/site-packages/conda/cli/main.py", line 162, in main
    return conda_exception_handler(_main, *args)
  File "/home/hok/anaconda2/lib/python2.7/site-packages/conda/exceptions.py", line 630, in conda_exception_handler
    return handle_exception(e)
  File "/home/hok/anaconda2/lib/python2.7/site-packages/conda/exceptions.py", line 620, in handle_exception
    print_unexpected_error_message(e)
  File "/home/hok/anaconda2/lib/python2.7/site-packages/conda/exceptions.py", line 561, in print_unexpected_error_message
    from conda.base.context import context
  File "/home/hok/anaconda2/lib/python2.7/site-packages/conda/base/context.py", line 18, in <module>
    from .._vendor.auxlib.path import expand
  File "/home/hok/anaconda2/lib/python2.7/site-packages/conda/_vendor/auxlib/path.py", line 8, in <module>
    import pkg_resources
  File "/home/hok/anaconda2/lib/python2.7/site-packages/pkg_resources/__init__.py", line 72, in <module>
    import packaging.requirements
  File "/home/hok/anaconda2/lib/python2.7/site-packages/packaging/requirements.py", line 59, in <module>
    MARKER_EXPR = originalTextFor(MARKER_EXPR())("marker")
TypeError: __call__() takes exactly 2 arguments (1 given)

Solution

将 protobuf-3.2.0 降级为 protobuf-3.1.0

pip install --upgrade   https://storage.googleapis.com/tensorflow/linux/cpu/protobuf-3.1.0-cp27-none-linux_x86_64.whl

将 setuptools 从 35 降到 33

pip install setuptools==33.1.1


推荐阅读更多精彩内容

  • 背景 一年多以前我在知乎上答了有关LeetCode的问题, 分享了一些自己做题目的经验。 张土汪:刷leetcod...
    土汪阅读 11,579评论 0 33
  • 以下为小日常、青子记账、布谷番茄、小半相机的隐私政策与使用条款。 隐私政策 本应用尊重并保护所有使用服务用户的个人...
    Mr航阅读 43,325评论 16 3
  • 朋友圈人人都有,有的人把它当做“自拍墙”和“情绪发泄器”,有的人却在里面自带光环,展示一份隐形简历。 1. 朋友圈...
    勇哥在进化阅读 594评论 0 6
  • 其实我们每个人都一样,每个人心中都有渴望,都有梦想,但是成功与否在于人所走的路,而不同的路通往的便是不同的人生...
    秣驹阅读 146评论 0 0