import PIL
from torch.utils.collect_env import get_pretty_env_info
def get_pil_version():
return "\n Pillow ({})".format(PIL.__version__)
def collect_env_info():
env_str = get_pretty_env_info()
env_str += get_pil_version()
return env_str
print (collect_env_info())
于小勇 发布了888 篇原创文章 · 获赞 93 · 访问量 18万+ 关注