我有python 3.5,试图在PyCharm中安装日志包,我收到一个错误:
安装包'记录'时发生错误 确保使用此软件包支持的Python版本。目前您正在使用Python 3.5。
import logging
logging.warning('Watch out!')
logging.info('I told you so')
更新:
如果包括在内为什么我得到了这个:
Traceback (most recent call last):
File "C:/Users/alotfi/PycharmProjects/firstProj/logging.py", line 1, in <module>
import logging
File "C:\Users\alotfi\PycharmProjects\firstProj\logging.py", line 2, in <module>
logging.warning('Watch out!')
AttributeError: module 'logging' has no attribute 'warning'
Process finished with exit code 1
感谢。