PyCharm 警告未解决的参考内置日期时间模块 [英] PyCharm warns for unresolved reference builtin datetime module

查看:27
本文介绍了PyCharm 警告未解决的参考内置日期时间模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚安装了最新版本的 PyCharm (4.5).

I just installed the latest version of PyCharm (4.5).

现在我遇到了未解决的参考错误.在我的代码顶部,我有:

Now I am experiencing unresolved reference errors. On the top of my code I have:

from datetime import datetime

操作系统是 Ubuntu 15.04.已经多次进行无效缓存/重新启动.没有不同.我的项目的项目解释器设置为 Python 2.7.6.已经重新加载了 Interperter Paths.

OS is Ubuntu 15.04. Already did the Invalidate Cache/Restart several times. No difference. The Project interpreter of my project is set to Python 2.7.6. Already reloaded the Interperter Paths.

代码可以正常工作,只是 IDE 会产生烦人的错误并且不再自动完成.

Code works fine, it's just the IDE that produces an annoying error and no more autocomplete.

推荐答案

如前所述这里 尝试删除骨架文件夹的内容.它位于设置文件夹中(~/.PyCharmxxxx.xx/system/python_stubs)我不需要删除/添加 python 环境.删除内容(或整个 python_stubs 文件夹)后,只需重新启动 PyCharm

As mentioned here try to delete the content of the skeleton folder. It reside inside of the settingsfolder (~/.PyCharmxxxx.xx/system/python_stubs) Removing/adding the python environment was not necessary for me. Simply restart PyCharm after removing the content (or the whole python_stubs folder)

这对我有用,现在它再次像(py)魅力一样工作.

This does the trick for me and now it works like a (py)charm again.

这篇关于PyCharm 警告未解决的参考内置日期时间模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆