解决 ImportError: C extension: No module named ‘pandas._libs.tslib‘ not built.

#yolo配置

报错:

nvidia@nx:~/yolov5-master$ python3 detect.py
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pandas/__init__.py", line 26, in 
    from pandas._libs import (hashtable as _hashtable,
  File "/usr/lib/python3/dist-packages/pandas/_libs/__init__.py", line 4, in 
    from .tslib import iNaT, NaT, Timestamp, Timedelta, OutOfBoundsDatetime
ModuleNotFoundError: No module named 'pandas._libs.tslib'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "detect.py", line 42, in 
    from models.common import DetectMultiBackend
  File "/home/nvidia/yolov5-master/models/common.py", line 16, in 
    import pandas as pd
  File "/usr/lib/python3/dist-packages/pandas/__init__.py", line 32, in 
    raise ImportError("C extension: {0} not built. If you want to import "
ImportError: C extension: No module named 'pandas._libs.tslib' not built. If you want to import pandas from the source directory, you may need to run 'python setup.py build_ext --inplace --force' to build the C extensions first.

解决方法:

sudo pip3 uninstall pandas

sudo pip3 install pandas

如果是用python3就用pip3,python就用pip

你可能感兴趣的:(python,嵌入式硬件,人工智能,深度学习)