سؤال

I have python-2.6 installed and use pycharm-3.1.3 (community edition) to develop.

But the imports of the built-in libraries (for instance - datetime) are marked as errors by the given IDE.

enter image description here

It only happens for built-in libraries, the external ones that are located in <pythondir>/Lib (for instance base64) are imported without problems - IDE can resolve symbols from them for intellisense and whatnot.

So the question is how to deal with this?

PS: I know I can mark it as "ignore this import error" but then the library symbols won't be autocompleted.

هل كانت مفيدة؟

المحلول

It happened right after an upgrade from 3.0 to 3.1.x, so probably it's just some upgrade issue.

The solution is to re-add interpreter. After that all built-in modules are resolved fine.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top