我在jupyter笔记本中收到这个警告.
/anaconda3/lib/python3.6/site-packages/ipykernel_launcher.py:10: DeprecationWarning: object of typecannot be safely interpreted as an integer. # Remove the CWD from sys.path while we load stuff. /anaconda3/lib/python3.6/site-packages/ipykernel_launcher.py:11: DeprecationWarning: object of type cannot be safely interpreted as an integer. # This is added back by InteractiveShellApp.init_path()
这很烦人,因为它出现在我做的每一次跑步中:
我该如何修复或禁用它?
如果您确定您的代码是正确且简单的想要消除此警告以及笔记本中的所有其他警告,请执行以下操作:
import warnings warnings.filterwarnings('ignore')