赞
踩
问题报错描述
D:\Anaconda3\envs\yolo5\python.exe C:\Users\aw\Desktop\yolov5-alphapose-stgcn\main_ui.py
Traceback (most recent call last):
File "C:\Users\aw\Desktop\yolov5-alphapose-stgcn\main_ui.py", line 3, in <module>
from UI.MainWindows import MainWinddow
File "C:\Users\aw\Desktop\yolov5-alphapose-stgcn\UI\MainWindows.py", line 10, in <module>
from video_process import videoprocess
File "C:\Users\aw\Desktop\yolov5-alphapose-stgcn\video_process.py", line 15, in <module>
from fn import draw_single
File "C:\Users\aw\Desktop\yolov5-alphapose-stgcn\fn.py", line 13, in <module>
from torch._six import string_classes, int_classes
ImportError: cannot import name 'int_classes' from 'torch._six' (D:\Anaconda3\envs\yolo5\lib\site-packages\torch\_six.py)
解决方案,点击报错的的链接,跳转到fn.py
然后找到【from torch._six import string_classes, int_classes】
把它替换为,也就是替换成下面的两个导入语句,重新运行代码即可解决,如果有用,点个赞呗
from torch._six import string_classes
import collections.abc as int_classes
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。