cannot import name 'ForkingMixIn'

2018-03-13 15:06:59 +08:00
 supervipcard

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

2457 次点击
所在节点    Python
4 条回复
PureWhite
2018-03-13 15:26:13 +08:00
提问之前请自己先 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
2018-03-13 15:58:36 +08:00
@PureWhite 当然 Google 过了,有人说这是 Werkzeug 旧版本的 bug,需要更新到最新版本。然而我更新了,并没有用 。另外我在 Ubuntu 上用 python3.5 和 3.6 都试过了,没问题。
supervipcard
2018-03-13 16:07:22 +08:00
@PureWhite 好吧 知道了 谢谢回复
julyclyde
2018-03-14 12:05:03 +08:00
@supervipcard 你 google 过了也没搞明白为什么,只是照着别人的步骤去做而已

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/437625

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX