문제

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