【发布时间】:2018-05-09 21:57:38
【问题描述】:
我想在 python 脚本中导入 pydicom。因此,我使用以下命令执行此操作而没有任何警告消息:
import sys, warnings
if not sys.warnoptions:
warnings.simplefilter("ignore")
try:
import pydicom as dicom
except ImportError:
import dicom
但我收到以下警告信息!!!!
/Users/anaconda3/lib/python3.6/site-packages/dicom/__init__.py:53: UserWarning:
This code is using an older version of pydicom, which is no longer
maintained as of Jan 2017. You can access the new pydicom features and API
by installing `pydicom` from PyPI.
See 'Transitioning to pydicom 1.x' section at pydicom.readthedocs.org
for more information.
warnings.warn(msg)
/Users/anaconda3/lib/python3.6/site-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
from ._conv import register_converters as _register_converters
如何隐藏它?
【问题讨论】:
-
您是否有任何特定于 Python 2 的问题需要标记此 Python 2?您似乎没有使用 Python 2。
-
我使用 python 3,这篇文章是针对 python 3 的,但我也遇到了 python 2 的问题。
标签: python python-3.x pydicom