PyCharm warns for unresolved reference builtin datetime module(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 警告未解决的参考内置日期时间模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:PyCharm 警告未解决的参考内置日期时间模块
基础教程推荐
- 将 x 轴刻度更改为自定义字符串 2022-01-01
- Discord.py 缺少必需的参数 2022-01-01
- 在 Celery 工作人员中捕获 Heroku SIGTERM 以优雅地关 2022-01-01
- 使用生成器和迭代器时 Python 多循环失败 2022-01-01
- 用 Python 编写 Fortran 无格式文件 2022-01-01
- pyserial - 可以从线程 a 写入串行端口,是否阻塞从线程 b 读取? 2022-01-01
- 尝试制作WhatsApp机器人 2022-01-01
- 与常规 dict 相比,Python manager.dict() 非常慢 2022-01-01
- numpy float:比算术运算中内置的慢 10 倍? 2022-01-01
- 由Python将MP3转换为MIDI(类型错误:无法加载插件:mtg-Melodia:Melodia) 2022-01-01
