4

I have installed the module "six", and it can be found by the PyCharm Interpreter.

PyCharm Interpreter:

enter image description here

However, PyCharm reports that it cannot resolve reference 'queue' which should be imported from six.

Unresolved reference queue:

enter image description here

4

2 回答 2

1

你的代码很好。这是因为移动的属性和模块six是延迟加载的,因此 PyCharm 无法解析引用。

Module_six_moves_urllib_parse请参阅 中的类的源代码six.py

于 2017-02-09T12:49:04.990 回答
0

我有同样的问题,如果你有六个导入,你可以按如下方式导入队列:

import six
import queue

它对我有用,希望它也对你有用。

于 2021-10-12T08:48:42.160 回答