推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
supervipcard
V2EX  ›  Python

cannot import name 'ForkingMixIn'

  •  
  •   supervipcard · Mar 13, 2018 · 2999 views
    This topic created in 3014 days ago, the information mentioned may be changed or developed.

    from socketserver import ForkingMixIn 报错 cannot import name 'ForkingMixIn'
    python 版本是 3.6 的

    4 replies    2018-03-14 12:05:03 +08:00
    PureWhite
        1
    PureWhite  
       Mar 13, 2018
    提问之前请自己先 Google。

    Check if OS can fork before importing ForkingMixIn since Python 3.6 will no longer define that when it is not available on the operating system (python/cpython@aadff9b) and ImportError: cannot import name 'ForkingMixIn' will occur.

    https://github.com/pallets/werkzeug/pull/999
    supervipcard
        2
    supervipcard  
    OP
       Mar 13, 2018
    @PureWhite 当然 Google 过了,有人说这是 Werkzeug 旧版本的 bug,需要更新到最新版本。然而我更新了,并没有用 。另外我在 Ubuntu 上用 python3.5 和 3.6 都试过了,没问题。
    supervipcard
        3
    supervipcard  
    OP
       Mar 13, 2018
    @PureWhite 好吧 知道了 谢谢回复
    julyclyde
        4
    julyclyde  
       Mar 14, 2018
    @supervipcard 你 google 过了也没搞明白为什么,只是照着别人的步骤去做而已
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2914 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 13:06 · PVG 21:06 · LAX 06:06 · JFK 09:06
    ♥ Do have faith in what you're doing.