Ubuntu16.04 报错ImportError: torch.utils.ffi requires the cffi package

报错
from .dcn_v2_func import DCNv2Function
File “/root/deepblue/2_MOT/centerNet-deep-sort/CenterNet/src/lib/models/networks/DCNv2/dcn_v2_func.py”, line 9, in
from ._ext import dcn_v2 as _backend
File “/root/deepblue/2_MOT/centerNet-deep-sort/CenterNet/src/lib/models/networks/DCNv2/_ext/dcn_v2/init.py”, line 2, in
from torch.utils.ffi import _wrap_function
File “/root/miniconda2/envs/torch40/lib/python3.6/site-packages/torch/utils/ffi/init.py”, line 14, in
raise ImportError(“torch.utils.ffi requires the cffi package”)
ImportError: torch.utils.ffi requires the cffi package

解决:
pip install cffi

你可能感兴趣的:(pytorch)